syncthing/lib
Jakob Borg d7d45d8092 lib/db: Refactor away the large genericReplace thing
This removes a significant, complex chunk of database code. The
"replace" operation walked both the old and new in lockstep and made the
relevant changes to make the new situation correct. But since delta
indexes we pretty much never need this - we just used replace to drop
the existing data and start over.

This makes that explicit and removes the complexity.

(This is one of those things that would be annoying to make case
insensitive, while the actual "drop and then insert" that we do is
easier.)

This is fairly well unit tested...

The one change to the tests is to cover the fact that previously replace
with something identical didn't bump the sequence number, while
obviously removing everything and re-inserting does. This is not
behavior we depend on anywhere.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4500
LGTM: imsodin, AudriusButkevicius
2017-11-12 20:20:34 +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 all: Add invalid/ignored files to global list, announce to peers (fixes #623) 2017-11-11 19:18:17 +00:00
connections lib/connections: Indicate stack in transport (fixes #4463) 2017-11-07 07:25:05 +00:00
db lib/db: Refactor away the large genericReplace thing 2017-11-12 20:20:34 +00:00
dialer all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
discover all: Add invalid/ignored files to global list, announce to peers (fixes #623) 2017-11-11 19:18:17 +00:00
events cmd/syncthing: Allow custom event subscriptions (fixes #1879) 2017-04-13 17:14:34 +00:00
fs all: Add invalid/ignored files to global list, announce to peers (fixes #623) 2017-11-11 19:18:17 +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: Refactor away the large genericReplace thing 2017-11-12 20:20:34 +00:00
nat all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
osutil all: Fix comment typos 2017-11-04 07:20:11 +00:00
pmp all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
protocol all: Add invalid/ignored files to global list, announce to peers (fixes #623) 2017-11-11 19:18:17 +00:00
rand all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
rc all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
relay all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
scanner lib/ignore: Consistent behaviour for nil *Matcher 2017-09-06 06:39:18 +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 lib/sync: Make some tests not depend on real clock 2017-04-01 11:03:11 +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 lib/upnp: Fix build 2017-08-21 11:41:40 +00:00
util all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
versioner all: Convert folders to use filesystem abstraction 2017-08-19 14:36:56 +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