syncthing/lib/model
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
..
testdata lib/model: Spurious tmp file (ref #6607) (#6609) 2020-05-07 08:49:59 +02:00
blockpullreorderer.go lib/model: Add support for different puller block ordering (#6587) 2020-05-11 22:44:04 +01:00
blockpullreorderer_test.go lib/model: Add support for different puller block ordering (#6587) 2020-05-11 22:44:04 +01:00
bytesemaphore.go lib/model: Don't exit pullerRoutine on cancelled ctx (fixes #6559) (#6562) 2020-04-21 18:55:14 +01:00
bytesemaphore_test.go lib/model: Allow limiting number of concurrent scans (fixes #2760) (#4888) 2018-12-05 08:40:05 +01:00
debug.go all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
deviceactivity.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
deviceactivity_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
devicedownloadstate.go lib/db, lib/model: Keep need stats in metadata (ref #5899) (#6413) 2020-05-11 15:07:06 +02:00
devicedownloadstate_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
doc.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
fakeconns_test.go lib/model, lib/protocol: Add contexts sending indexes and download-progress (#6176) 2019-11-25 11:07:36 +01:00
folder.go all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
folder_recvonly.go lib/db: Refactor to use global list by version (fixes #6372) (#6638) 2020-05-30 09:50:23 +02:00
folder_recvonly_test.go lib/model: Fixup spelling of protocol.FileIntf in test (ref #6463) 2020-08-27 16:21:04 +02:00
folder_sendonly.go all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
folder_sendrecv.go all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
folder_sendrecv_test.go lib/fs: Unwrap mtimeFile, get fd the "correct" way (ref #6875) (#6877) 2020-08-07 07:47:48 +02:00
folder_summary.go lib/api, lib/model: Fixes around event request tracking (#6774) 2020-06-25 21:48:48 +02:00
folder_test.go lib/fs: Properly handle case insensitive systems (fixes #1787, fixes #2739, fixes #5708) 2020-07-28 11:15:11 +02:00
folderstate.go lib/model, lib/versioner: Drive version cleanup from scanner (fixes #6313) (#6693) 2020-07-14 10:48:50 +02:00
model.go lib/db, lib/model: Avoid accounting mishap on folder restart (fixes #6938) (#6939) 2020-08-27 18:33:27 +02:00
model_test.go all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
progressemitter.go lib/model: Progress emitter network operations dont need to be blocking (#6589) 2020-05-01 08:54:15 +01:00
progressemitter_test.go lib/model: Progress emitter network operations dont need to be blocking (#6589) 2020-05-01 08:54:15 +01:00
queue.go lib/model: Make jobQueue.Jobs paginated (fixes #5754) (#5804) 2019-06-27 19:25:38 +01:00
queue_test.go lib/model: Make jobQueue.Jobs paginated (fixes #5754) (#5804) 2019-06-27 19:25:38 +01:00
requests_test.go lib/fs: Properly handle case insensitive systems (fixes #1787, fixes #2739, fixes #5708) 2020-07-28 11:15:11 +02:00
sentdownloadstate.go lib/db, lib/model: Keep need stats in metadata (ref #5899) (#6413) 2020-05-11 15:07:06 +02:00
sharedpullerstate.go all: Add copy-on-write filesystem support (fixes #4271) (#6746) 2020-06-18 08:15:47 +02:00
sharedpullerstate_test.go lib/model: Use errors.Wrap for pull errors (#5563) 2019-03-04 13:01:52 +00:00
testos_test.go lib/fs: Properly handle case insensitive systems (fixes #1787, fixes #2739, fixes #5708) 2020-07-28 11:15:11 +02:00
testutils_test.go lib/fs: Properly handle case insensitive systems (fixes #1787, fixes #2739, fixes #5708) 2020-07-28 11:15:11 +02:00
util.go all: Remove potentially problematic errors from panics (fixes #5839) (#5912) 2019-07-31 10:53:35 +02:00
utils_test.go all: Remove potentially problematic errors from panics (fixes #5839) (#5912) 2019-07-31 10:53:35 +02:00