syncthing/lib
Jakob Borg b80da29b23 lib/db: Fix inconsistency in sequence index (fixes #5149) (#5158)
The problem here is that we would update the sequence index before
updating the FileInfos, which would result in a high sequence number
pointing to a low-sequence FileInfo. The index sender would pick up the
high sequence number, send the old file, and think everything was good.
On the receiving side the old file is a no-op and ignored. The file
remains out of sync until another update for it happens.

This fixes that by correcting the order of operations in the database
update: first we remove old sequence index entries, then we update the
FileInfos (which now don't have anything pointing to them) and then we
add the sequence indexes (which the index sender can see).

The other option is to add "proper" transactions where required at the
database layer. I actually have a branch for that, but it's literally
thousands of lines of diff and I'm putting that off for another day as
this solves the problem...
2018-09-02 21:02:28 +02:00
..
auto build: Let "go generate" create assets 2018-06-26 10:29:36 +02: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: Fix aliased append, copy config inputs and outputs (fixes #5063) (#5069) 2018-07-26 23:14:12 +02:00
connections lib/connections: Don't spin on accept failures (fixes #5025) (#5036) 2018-06-27 08:24:30 +02:00
db lib/db: Fix inconsistency in sequence index (fixes #5149) (#5158) 2018-09-02 21:02:28 +02:00
dialer lib/dialer: Register dialer for socks URL scheme (fixes #4515) 2017-12-08 12:04:43 +00:00
discover lib/config, lib/discover: Support new discovery cluster (ref #4618) 2018-01-05 14:18:32 +00:00
events all: Fix FS watcher restarting and web UI indication (fixes #4923) (#4962) 2018-06-11 15:47:54 +02:00
fs lib/fs: Catch size-preserving changes on windows (fixes #5050) (#5056) 2018-07-09 18:29:22 +01:00
ignore lib/ignore, lib/scanner: Fix recursion to catch included paths (fixes #5009) (#5010) 2018-06-18 08:22:19 +02:00
logger lib/logger: Add missing dots (fixes #5073) 2018-07-19 20:49:57 +02:00
model lib/db: Fix inconsistency in sequence index (fixes #5149) (#5158) 2018-09-02 21:02:28 +02:00
nat lib/nat: Fix clearAddresses/notify deadlock (ref #4601) (#4829) 2018-03-21 08:02:32 +01:00
osutil lib/osutil: Add test for IsDeleted (ref #4925) (#4936) 2018-05-10 21:39:33 +02:00
pmp all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
protocol all: Add receive only folder type (#5027) 2018-07-12 11:15:57 +03: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 all: Add receive only folder type (#5027) 2018-07-12 11:15:57 +03: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, lib/sync: Don't do deadlock detection when STDEADLOCKTIMEOUT=0 (fixes #4644) 2018-01-15 13:33:52 +00:00
tlsutil lib/tlsutil: Remove undesired bufio from UnionedConnection (ref #4245) 2017-08-31 07:34:48 +00:00
upgrade lib/upgrade: Tests should pass on darwin-386 2018-06-06 09:47:13 +02:00
upnp lib/upnp: Don’t log unknown device types (fixes #5038) (#5087) 2018-07-30 16:34:35 +02:00
util lib/config, lib/model: Tweaks to the auto accept feature 2017-12-07 08:33:32 +00:00
versioner lib/versioner: Fix external versioner command specification on Windows (fixes #4560) 2018-02-07 14:12:27 +00:00
watchaggregator lib/watchaggregator: Speedup propagation of removals (fixes #4953) (#4955) 2018-05-26 10:08:23 +01:00
weakhash lib/model, lib/weakhash: Abort pulling quicker on folder stop (ref #5028) 2018-07-04 08:07:33 +01:00