syncthing/lib/db
Jakob Borg 4f7a77597e
lib/db: Slightly improve indirection (ref #6372) (#6373)
I was working on indirecting version vectors, and that resulted in some
refactoring and improving the existing block indirection stuff. We may
or may not end up doing the version vector indirection, but I think
these changes are reasonable anyhow and will simplify the diff
significantly if we do go there. The main points are:

- A bunch of renaming to make the indirection and GC not about "blocks"
  but about "indirection".

- Adding a cutoff so that we don't actually indirect for small block
  lists. This gets us better performance when handling small files as it
  cuts out the indirection for quite small loss in space efficiency.

- Being paranoid and always recalculating the hash on put. This costs
  some CPU, but the consequences if a buggy or malicious implementation
  silently substituted the block list by lying about the hash would be bad.
2020-02-27 11:19:21 +01:00
..
backend lib/db: Keep metadata better in sync (ref #6335) (#6337) 2020-02-13 15:23:08 +01:00
testdata lib/db: Add index to track locally needed files (#4958) 2018-06-02 15:08:32 +02:00
.gitignore Change DB label format (index folders, devices) 2016-01-03 19:32:40 +01:00
benchmark_test.go all: Transactionalize db.FileSet (fixes #5952) (#6239) 2020-01-21 18:23:08 +01:00
blockmap_test.go lib/db: Use Commit() instead of commit() (#6330) 2020-02-12 11:59:55 +01:00
blockmap.go lib/db: Remove *instance by making everything *Lowlevel (#6204) 2019-12-02 08:18:04 +01:00
db_test.go lib/db: Add closeWaitGroup to allow async operation (#6317) 2020-02-11 14:31:43 +01:00
debug.go all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
keyer_test.go lib/db: Add closeWaitGroup to allow async operation (#6317) 2020-02-11 14:31:43 +01:00
keyer.go lib/db: Deduplicate block lists in database (fixes #5898) (#6283) 2020-01-24 08:35:44 +01:00
lowlevel.go lib/db: Slightly improve indirection (ref #6372) (#6373) 2020-02-27 11:19:21 +01:00
meta_test.go lib/db: Fix sequence updating for remote invalid items (#5420) 2019-01-04 20:19:10 +01:00
meta.go lib/db: Keep metadata better in sync (ref #6335) (#6337) 2020-02-13 15:23:08 +01:00
namespaced_test.go lib/db: Add closeWaitGroup to allow async operation (#6317) 2020-02-11 14:31:43 +01:00
namespaced.go all: Propagate errors from NamespacedKV (#6203) 2019-11-30 13:03:24 +01:00
schemaupdater.go lib/db: Slightly improve indirection (ref #6372) (#6373) 2020-02-27 11:19:21 +01:00
set_test.go lib/db: Add closeWaitGroup to allow async operation (#6317) 2020-02-11 14:31:43 +01:00
set.go lib/db: Schema update to repair sequence index (ref #6304) (#6350) 2020-02-22 09:36:59 +01:00
smallindex_test.go Implement database abstraction, error checking (ref #5907) (#6107) 2019-11-29 09:11:52 +01:00
smallindex.go Implement database abstraction, error checking (ref #5907) (#6107) 2019-11-29 09:11:52 +01:00
structs.go lib: Modify FileInfos consistently (ref #6321) (#6349) 2020-02-19 16:58:09 +01:00
structs.pb.go lib/db: Deduplicate block lists in database (fixes #5898) (#6283) 2020-01-24 08:35:44 +01:00
structs.proto lib/db: Deduplicate block lists in database (fixes #5898) (#6283) 2020-01-24 08:35:44 +01:00
transactions.go lib/db: Slightly improve indirection (ref #6372) (#6373) 2020-02-27 11:19:21 +01:00
util_test.go Implement database abstraction, error checking (ref #5907) (#6107) 2019-11-29 09:11:52 +01:00