syncthing/lib/db
Jakob Borg ce65aea0ab
lib/db: Use a more concurrent GC (fixes #7722) (#7750)
This changes the GC mechanism so that the first pass (which reads all
FileInfos to populate bloom filters with block & version hashes) can
happen concurrently with normal database operations.

The big gcMut still exists, and we grab it temporarily to block all
other modifications while we set up the bloom filters. We then release
the lock and let other things happen, with those other things also
updating the bloom filters as required. Once the first phase is done we
again grab the gcMut, knowing that we are the sole modifier of the
database, and do the cleanup.

I also removed the final compaction step.
2021-06-07 10:52:06 +02:00
..
backend lib/db: Remove Badger experiment (#7413) 2021-03-01 09:16:08 +01:00
testdata lib/db, lib/model: Keep need stats in metadata (ref #5899) (#6413) 2020-05-11 15:07:06 +02:00
.gitignore Change DB label format (index folders, devices) 2016-01-03 19:32:40 +01:00
benchmark_test.go all: Remove miscellaneous vestigial code (#7495) 2021-03-17 22:23:12 +01:00
blockmap_test.go all: Handle errors opening db/creating file-set (ref #5907) (#7150) 2020-12-21 12:59:22 +01:00
blockmap.go lib/db: Remove unused blockFinder global (#6534) 2020-04-14 17:09:59 +02:00
db_test.go lib/db: Handle indirection error repairing sequences (fixes #7026) (#7525) 2021-04-05 10:24:16 +02:00
debug.go all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
keyer_test.go all: Handle errors opening db/creating file-set (ref #5907) (#7150) 2020-12-21 12:59:22 +01:00
keyer.go lib/fs, lib/api, lib/model: Expose mtime remappings as part of /db/file (#7624) 2021-05-03 11:28:25 +01:00
lowlevel.go lib/db: Use a more concurrent GC (fixes #7722) (#7750) 2021-06-07 10:52:06 +02:00
meta_test.go lib: Return error from db.FileSet.Snapshot (fixes #7419, ref #5907) (#7424) 2021-03-07 13:43:22 +01:00
meta.go lib/db: Fix some omitted error checks, unused variable (#7489) 2021-03-17 21:41:07 +01:00
namespaced_test.go all: Handle errors opening db/creating file-set (ref #5907) (#7150) 2020-12-21 12:59:22 +01:00
namespaced.go cmd/syncthing, lib/db: Store upgrade info to throttle queries (fixes #6513) (#6514) 2020-04-13 10:21:07 +02:00
observed.go all: Allow dismissing pending devices / folders without ignoring (fixes #7700) (#7712) 2021-06-07 10:29:24 +02:00
schemaupdater.go lib/model: Don't use empty folder cfg for index sender (fixes #7649) (#7671) 2021-05-15 11:13:39 +02:00
set_test.go lib: Revert needing invalid files (fixes #7608, ref #7476) (#7609) 2021-04-29 22:01:46 +02:00
set.go lib/model: Don't use empty folder cfg for index sender (fixes #7649) (#7671) 2021-05-15 11:13:39 +02:00
smallindex_test.go all: Handle errors opening db/creating file-set (ref #5907) (#7150) 2020-12-21 12:59:22 +01:00
smallindex.go Implement database abstraction, error checking (ref #5907) (#6107) 2019-11-29 09:11:52 +01:00
structs.go all: Remove miscellaneous vestigial code (#7495) 2021-03-17 22:23:12 +01:00
structs.pb.go all: Regenerate proto (#7696) 2021-05-19 13:30:20 +02:00
transactions.go lib/db: Use a more concurrent GC (fixes #7722) (#7750) 2021-06-07 10:52:06 +02:00
util_test.go lib: Return error from db.FileSet.Snapshot (fixes #7419, ref #5907) (#7424) 2021-03-07 13:43:22 +01:00
util.go lib: Revert needing invalid files (fixes #7608, ref #7476) (#7609) 2021-04-29 22:01:46 +02:00