syncthing/lib
Jakob Borg 3ffbe45a6d
lib/db, lib/model: Avoid accounting mishap on folder restart (fixes #6938) (#6939)
We created a new fileset before stopping the folder during restart. When
we create that fileset it loads the current metadata and sequence
numbers from the database. But the folder may have time to update those
before stopping, leaving the new fileset with bad data.

This would cause wrong accounting (forgotten files) and potentially
sequence reuse causing files not sent to other devices.

This change reuses the fileset on restart, skipping the issue entirely.
It also moves the creation of the fileset back under the lock so there
should be no chance of concurrency issues here.
2020-08-27 18:33:27 +02:00
..
api all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
assets lib/assets: Allow assets to remain uncompressed (#6661) 2020-05-25 08:51:27 +02:00
beacon lib/beacon: Only send to appropriately flagged interfaces (ref #5957) (#6404) 2020-03-17 09:40:37 +01:00
build build: Actually set build tags (#6866) 2020-07-30 10:58:43 +02:00
config lib/connections: Announce LAN addresses by default (fixes #6928) (#6896) 2020-08-25 11:48:14 +02:00
connections lib/connections: Announce LAN addresses by default (fixes #6928) (#6896) 2020-08-25 11:48:14 +02:00
db all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
dialer lib/dialer: Try dialing without reuse in parallel (fixes #6892) (#6893) 2020-08-18 13:11:12 +02:00
discover lib/connections: Announce LAN addresses by default (fixes #6928) (#6896) 2020-08-25 11:48:14 +02:00
events lib/api, lib/model: Fixes around event request tracking (#6774) 2020-06-25 21:48:48 +02:00
fs all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
ignore gui, lib/ignore: Handle editing ignores with error (fixes #5425) (#6757) 2020-06-18 11:04:00 +02:00
locations lib/db: Add Badger backend (fixes #5910) (#6250) 2020-05-29 13:43:02 +02:00
logger all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
model lib/db, lib/model: Avoid accounting mishap on folder restart (fixes #6938) (#6939) 2020-08-27 18:33:27 +02:00
nat lib/nat: Don't hang on draining timer chan (fixes #6908) (#6912) 2020-08-19 15:58:44 +01:00
osutil lib/osutil: Check returned error instead of info (ref #6885) (#6887) 2020-08-12 11:33:56 +02:00
pmp lib/nat: Make service termination faster (#6777) 2020-06-22 09:01:57 +01:00
protocol all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
rand lib/rand: Various minor fixes (#6752) 2020-06-17 10:43:58 +02:00
rc all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
relay all: Make all error implementations pointer types (#6726) 2020-06-16 09:27:34 +02:00
scanner lib/fs: Properly handle case insensitive systems (fixes #1787, fixes #2739, fixes #5708) 2020-07-28 11:15:11 +02:00
sha256 Add indirection for large version vectors. (#6376) 2020-05-13 14:28:42 +02:00
signature all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stats all: Propagate errors from NamespacedKV (#6203) 2019-11-30 13:03:24 +01:00
stun lib: More contextification (#6343) 2020-02-24 21:57:15 +01:00
sync lib/sync: Cleanly fail instead of panic in tests (#6088) 2019-10-16 10:11:11 +02:00
syncthing lib/syncthing: Also cleanup on startup error (#6926) 2020-08-27 15:52:51 +02:00
testutils lib/model, lib/testutils: Test closing a connection on folder restart (#5707) 2019-05-18 08:53:59 +02:00
tlsutil lib/connections, lib/tlsutil: Handle certName in Go 1.15 (fixes #6867) (#6868) 2020-07-30 13:36:11 +02:00
upgrade all: Tweak error creation (#6391) 2020-03-03 22:40:00 +01:00
upnp lib/nat: Make service termination faster (#6777) 2020-06-22 09:01:57 +01:00
ur all: Remove need to restart syncthing (#6883) 2020-08-18 09:26:33 +02:00
util all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
versioner Created cleanup functionality for syncthing (#6884) 2020-08-24 12:14:30 +01:00
watchaggregator lib: Replace done channel with contexts in and add names to util services (#6166) 2019-11-21 08:41:15 +01:00
weakhash lib/weakhash: Fix speed reporting in benchmark (#6470) 2020-03-29 17:07:25 +02:00