syncthing/lib/model
Jakob Borg f528923d1e lib/model, cmd/syncthing: Wait for folder restarts to complete (fixes #5233) (#5239)
* lib/model, cmd/syncthing: Wait for folder restarts to complete (fixes #5233)

This is the somewhat ugly - but on the other hand clear - fix for what
is really a somewhat thorny issue. To avoid zombie folder runners a new
mutex is introduced that protects the RestartFolder operation. I hate
adding more mutexes but the alternatives I can think of are worse.

The other part of it is that the POST /rest/system/config operation now
waits for the config commit to complete. The point of this is that until
the commit has completed we should not accept another config commit. If
we did, we could end up with two separate RestartFolders queued in the
background. While they are both correct, and will run without
interfering with each other, we can't guarantee the order in which they
will run. Thus it could happen that the newer config got committed
first, and the older config commited after that, leaving us with the
wrong config running.

* test

* wip

* hax

* hax

* unflake test

* per folder mutexes

* paranoia

* race
2018-10-05 09:26:25 +01:00
..
testdata lib/fs, lib/model: Make tests caching compatible (fixes #4749) (#4804) 2018-03-13 14:03:10 +01:00
debug.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
deviceactivity.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
devicedownloadstate_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
devicedownloadstate.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
folder_recvonly_test.go lib/model: Fixes on receive-only test setup and pulling (#5136) 2018-08-19 22:34:26 +01:00
folder_recvonly.go all: Check files on disk/in db when deleting/renaming (fixes #5194) (#5195) 2018-09-16 09:48:14 +02:00
folder_sendonly.go all: Add receive only folder type (#5027) 2018-07-12 11:15:57 +03:00
folder_sendrecv_test.go lib/model: Don't stop folder if out of disk space (fixes #2370) (#5099) 2018-08-25 10:16:38 +02:00
folder_sendrecv.go lib/model: Prevent repeat db update (#5231) 2018-09-27 07:41:40 +02:00
folder.go lib/model, cmd/syncthing: Wait for folder restarts to complete (fixes #5233) (#5239) 2018-10-05 09:26:25 +01:00
folderstate.go lib/model, lib/config: Refactor folder health/error handling (fixes #4445, fixes #4451) 2017-10-24 07:58:55 +00:00
model_test.go lib/model, cmd/syncthing: Wait for folder restarts to complete (fixes #5233) (#5239) 2018-10-05 09:26:25 +01:00
model.go lib/model, cmd/syncthing: Wait for folder restarts to complete (fixes #5233) (#5239) 2018-10-05 09:26:25 +01:00
progressemitter_test.go lib/model: Small fixes to test convenience functions (#5128) 2018-08-16 12:11:48 +02:00
progressemitter.go all: Correct various typos 2017-02-25 08:12:13 +00:00
queue_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
queue.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
requests_test.go all: Check files on disk/in db when deleting/renaming (fixes #5194) (#5195) 2018-09-16 09:48:14 +02:00
sentdownloadstate.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
sharedpullerstate_test.go lib/model: Remove dead code (*sharedPullerState).sourceFile 2017-12-12 11:30:47 +01:00
sharedpullerstate.go all: Implement variable sized blocks (fixes #4807) 2018-04-16 19:08:50 +01:00
util.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00