syncthing/cmd
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
..
stbench all: Fix comment typos 2017-11-04 07:20:11 +00:00
stcli all: Convert folders to use filesystem abstraction 2017-08-19 14:36:56 +00:00
stcompdirs lib: Folder marker is now a folder 2017-09-02 05:52:38 +00:00
stdisco all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stdiscosrv all: Weed out a few other http urls (ref #3976) 2017-02-09 08:04:16 +01:00
stevents all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stfileinfo lib/fs, lib/model, lib/scanner: Make scans cancellable (fixes #3965) 2017-04-26 00:15:23 +00:00
stfinddevice all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stgenfiles all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stindex all: Convert folders to use filesystem abstraction 2017-08-19 14:36:56 +00:00
strelaypoolsrv gui: HTML accessibility updates 2017-07-15 09:54:37 +00:00
strelaysrv all: Fix comment typos 2017-11-04 07:20:11 +00:00
stsigtool cmd/stsigtool: Silence spurious Go 1.10 test/vet complaint 2017-12-10 19:42:17 +01:00
stvanity all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stwatchfile all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
syncthing lib/db: Keep folder meta data persistently in db (fixes #4400) 2017-12-14 09:51:17 +00:00
todos all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
.gitignore Remove reprecated st* utils 2014-07-01 12:20:25 +02:00