syncthing/lib/protocol
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
..
benchmark_test.go lib/connections: Use own KCP fork, move listener setup earlier (ref #4446) 2017-10-22 12:36:36 +00:00
bep_extensions.go lib/db: Keep folder meta data persistently in db (fixes #4400) 2017-12-14 09:51:17 +00:00
bep.pb.go lib/db: Keep folder meta data persistently in db (fixes #4400) 2017-12-14 09:51:17 +00:00
bep.proto all: Remove symlink support on Windows, SymlinksEnabled config 2017-02-07 08:34:24 +00:00
bufferpool.go build: Enable gometalinter "gosimple" check, improve build.go 2016-12-21 14:53:45 +01:00
common_test.go lib/connections, lib/model: Refactor connection close handling (fixes #3466) 2016-08-10 09:37:32 +00:00
compression_test.go Add 'lib/protocol/' from commit 'f91191218b192ace841c878f161832d19c09145a' 2015-09-22 19:34:29 +02:00
compression.go lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080) 2016-07-04 10:40:29 +00:00
conflict_test.go lib/protocol, lib/model: Implement high precision time stamps (fixes #3305) 2016-08-06 13:05:59 +00:00
counting.go Add 'lib/protocol/' from commit 'f91191218b192ace841c878f161832d19c09145a' 2015-09-22 19:34:29 +02:00
debug.go lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080) 2016-07-04 10:40:29 +00:00
deviceid_test.go lib/protocol: Optimize luhn and chunk functions 2017-09-03 10:26:12 +00:00
deviceid_test.pb.go all: Add invalid/ignored files to global list, announce to peers (fixes #623) 2017-11-11 19:18:17 +00:00
deviceid_test.proto lib/protocol: Use DeviceID in protocol messages, with custom marshalling 2016-10-29 21:56:24 +00:00
deviceid.go lib/protocol, vendor: Import luhn code directly 2017-09-20 21:34:32 +02:00
doc.go Add 'lib/protocol/' from commit 'f91191218b192ace841c878f161832d19c09145a' 2015-09-22 19:34:29 +02:00
errors.go lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080) 2016-07-04 10:40:29 +00:00
hello_test.go lib/protocol: Hello message length is an int16 2016-07-17 21:41:20 +00:00
hello_v0.13_xdr.go lib/protocol: Understand older/newer Hello messages (fixes #3287) 2016-06-09 10:50:14 +00:00
hello_v0.13.go lib/protocol: Understand older/newer Hello messages (fixes #3287) 2016-06-09 10:50:14 +00:00
hello.go build: Enable gometalinter "gosimple" check, improve build.go 2016-12-21 14:53:45 +01:00
LICENSE Add 'lib/protocol/' from commit 'f91191218b192ace841c878f161832d19c09145a' 2015-09-22 19:34:29 +02:00
luhn_test.go lib/protocol, vendor: Import luhn code directly 2017-09-20 21:34:32 +02:00
luhn.go lib/protocol, vendor: Import luhn code directly 2017-09-20 21:34:32 +02:00
nativemodel_darwin.go lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080) 2016-07-04 10:40:29 +00:00
nativemodel_unix.go lib/model, lib/protocol: Implement temporary indexes (fixes #950) 2016-04-15 10:59:41 +00:00
nativemodel_windows_test.go lib/protocol: Apply input filtering on file names 2016-12-01 12:35:32 +00:00
nativemodel_windows.go lib/protocol: Warnln should have been Warnf 2016-12-21 10:43:12 +01:00
protocol_test.go lib/protocol: Add some consistency checks on incoming index updates (fixes #4053) 2017-03-27 07:21:08 +00:00
protocol.go all: Fix comment typos 2017-11-04 07:20:11 +00:00
vector_test.go build, cmd, lib: Minimum supported compiler version is Go 1.5 2016-08-15 08:37:32 +02:00
vector.go lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080) 2016-07-04 10:40:29 +00:00
wireformat.go lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080) 2016-07-04 10:40:29 +00:00