syncthing/lib/db
Jakob Borg f16817632f
lib/api: Improve folder summary event, verbose service (#9370)
This makes a couple of small improvements to the folder summary
mechanism:

- The folder summary includes the local and remote sequence numbers in
clear text, rather than some odd sum that I'm not sure what it was
intended to represent.
- The folder summary event is generated when appropriate, regardless of
whether there is an event listener. We did this before because
generating it was expensive, and we wanted to avoid doing it
unnecessarily. Nowadays, however, it's mostly just reading out
pre-calculated metadata, and anyway, it's nice if it shows up reliably
when running with -verbose.

The point of all this is to make it easier to use these events to judge
when devices are, in fact, in sync. As-is, if I'm looking at two
devices, it's very difficult to reliably determine if they are in sync
or not. The reason is that while we can ask device A if it thinks it's
in sync, we can't see if the answer is "yes" because it has processed
all changes from B, or if it just doesn't know about the changes from B
yet. With proper sequence numbers in the event we can compare the two
and determine the truth. This makes testing a lot easier.
2024-01-31 08:24:39 +01:00
..
backend lib: replace Readdir(-1) with os.ReadDir (#8901) 2023-05-11 15:35:52 +00: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 lib/db, lib/model: Remove filesystem state from FileSet (fixes #7850) (#8151) 2022-01-31 10:12:52 +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 all: Fix various user-facing and non-user-facing typos (#8509) 2022-08-23 15:44:11 +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 all: Remove unused method receivers (#8462) 2022-07-28 17:32:45 +02:00
lowlevel.go all: Remove lib/util package (#9049) 2023-08-21 19:44:33 +02:00
meta_test.go lib/db, lib/model: Remove filesystem state from FileSet (fixes #7850) (#8151) 2022-01-31 10:12:52 +01:00
meta.go all: Minor staticcheck fixes (#8939) 2023-06-19 06:50:53 +00: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 lib/db, lib/model: Improve error handling on pending items (#7754) 2021-06-09 13:35:17 +02:00
schemaupdater.go all: Unused parameter should be replaced by underscore (#8464) 2022-07-28 17:17:29 +02:00
set_test.go all: Fix various user-facing and non-user-facing typos (#8509) 2022-08-23 15:44:11 +02:00
set.go lib/api: Improve folder summary event, verbose service (#9370) 2024-01-31 08:24:39 +01: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 lib/api: Expose blocksHash in file info (#8810) 2023-03-06 15:37:15 +01:00
structs.pb.go all: Support syncing extended attributes (fixes #2698) (#8513) 2022-09-14 09:50:55 +02:00
transactions.go lib/db: Constant/unused args and return values, double it.Release (#8259) 2022-04-27 20:32:44 +02:00
util_test.go lib/db, lib/model: Remove filesystem state from FileSet (fixes #7850) (#8151) 2022-01-31 10:12:52 +01:00
util.go lib: Revert needing invalid files (fixes #7608, ref #7476) (#7609) 2021-04-29 22:01:46 +02:00