syncthing/cmd/stindex
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
..
accounting.go lib/db: Deduplicate block lists in database (fixes #5898) (#6283) 2020-01-24 08:35:44 +01:00
dump.go cmd/stindex: Teach it about new key types 2020-01-31 08:27:20 +01:00
dumpsize.go Implement database abstraction, error checking (ref #5907) (#6107) 2019-11-29 09:11:52 +01:00
idxck.go lib/db: Slightly improve indirection (ref #6372) (#6373) 2020-02-27 11:19:21 +01:00
main.go lib/db: Deduplicate block lists in database (fixes #5898) (#6283) 2020-01-24 08:35:44 +01:00
util.go all: Convert folders to use filesystem abstraction 2017-08-19 14:36:56 +00:00