syncthing/lib
Jakob Borg d1d967f0cf lib/db: Keep folder meta data persistently in db (fixes #4400)
This keeps the data we need about sequence numbers and object counts
persistently in the database. The sizeTracker is expanded into a
metadataTracker than handled multiple folders, and the Counts struct is
made protobuf serializable. It gains a Sequence field to assist in
tracking that as well, and a collection of Counts become a CountsSet
(for serialization purposes).

The initial database scan is also a consistency check of the global
entries. This shouldn't strictly be necessary. Nonetheless I added a
created timestamp to the metadata and set a variable to compare against
that. When the time since the metadata creation is old enough, we drop
the metadata and rebuild from scratch like we used to, while also
consistency checking.

A new environment variable STCHECKDBEVERY can override this interval,
and for example be set to zero to force the check immediately.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4547
LGTM: imsodin
2017-12-14 09:51:17 +00:00
..
auto all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
beacon lib/beacon: Don't exit after a single write failure (fixes #4414) 2017-10-12 07:13:44 +00:00
config lib/config, lib/model: Tweaks to the auto accept feature 2017-12-07 08:33:32 +00:00
connections gui, lib/config, lib/model: Support auto-accepting folders (fixes #2299) 2017-12-07 07:08:24 +00:00
db lib/db: Keep folder meta data persistently in db (fixes #4400) 2017-12-14 09:51:17 +00:00
dialer lib/dialer: Register dialer for socks URL scheme (fixes #4515) 2017-12-08 12:04:43 +00:00
discover lib/connections: Fix local address priority 2017-11-22 07:05:49 +00:00
events lib/events: Fix unmarshaling of EventType 2017-11-22 23:25:55 +00:00
fs lib/fs: Prolong test timeout on darwin, hopefully fixing flakyness 2017-12-06 22:07:08 +00:00
ignore lib/ignore: Consistent behaviour for nil *Matcher 2017-09-06 06:39:18 +00:00
logger cmd/syncthing, lib/logger: Set debug flags on SetDebug for tests 2017-06-02 07:04:06 +00:00
model lib/db: Keep folder meta data persistently in db (fixes #4400) 2017-12-14 09:51:17 +00:00
nat gui, lib/config, lib/model: Support auto-accepting folders (fixes #2299) 2017-12-07 07:08:24 +00:00
osutil lib/osutil, lib/scanner: Run symlink test on Windows when possible 2017-11-25 21:49:53 +00:00
pmp all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
protocol lib/db: Keep folder meta data persistently in db (fixes #4400) 2017-12-14 09:51:17 +00:00
rand all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
rc test: Mend tests for latest event changes etc 2017-11-13 00:25:07 +01:00
relay all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
scanner lib/osutil, lib/scanner: Run symlink test on Windows when possible 2017-11-25 21:49:53 +00:00
sha256 cmd/syncthing, lib/sha256: Skip CPU benchmarks when user decided (fixes #4348) 2017-09-06 06:55:47 +00:00
signature all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stats all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
sync cmd/syncthing: Clean up deadlock envvars 2017-12-13 19:40:12 +00:00
tlsutil lib/tlsutil: Remove undesired bufio from UnionedConnection (ref #4245) 2017-08-31 07:34:48 +00:00
upgrade lib/upgrade: 0.x to 1.0 is a minor upgrade 2017-06-25 14:17:43 +00:00
upnp gui, lib/config, lib/model: Support auto-accepting folders (fixes #2299) 2017-12-07 07:08:24 +00:00
util lib/config, lib/model: Tweaks to the auto accept feature 2017-12-07 08:33:32 +00:00
versioner lib/versioner: Purge the empty directories in .stversions (fixes #4406) 2017-11-18 15:56:53 +00:00
watchaggregator lib/watchaggregator: Don't care about timings during testing on darwin 2017-11-10 17:05:31 +00:00
weakhash all: Convert folders to use filesystem abstraction 2017-08-19 14:36:56 +00:00