syncthing/cmd
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
..
stbench all: Fix comment typos 2017-11-04 07:20:11 +00:00
stcli cmd/stcli: Add config command with pretty printed JSON (#5049) 2018-07-06 00:37:13 +02:00
stcompdirs lib: Folder marker is now a folder 2017-09-02 05:52:38 +00:00
stdisco all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stdiscosrv all, vendor: Switch back to non-forked thejerf/suture (#5171) 2018-09-08 12:56:56 +03:00
stevents all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stfileinfo all: Implement variable sized blocks (fixes #4807) 2018-04-16 19:08:50 +01:00
stfinddevice all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stfindignored cmd/stfindignored: Default to current directory 2018-06-06 22:24:36 +02:00
stgenfiles all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stindex all: Convert folders to use filesystem abstraction 2017-08-19 14:36:56 +00:00
strelaypoolsrv cmd/strelaypoolsrv: Prevent scraped metrics moving backwards (#5068) 2018-07-27 07:59:55 +02:00
strelaysrv cmd/strelaypoolsrv: Move metric scraping to the server itself (#4866) 2018-04-08 20:13:55 +01:00
stsigtool cmd/stsigtool: Silence spurious Go 1.10 test/vet complaint 2017-12-10 19:42:17 +01:00
stvanity all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stwatchfile all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
syncthing lib/model, cmd/syncthing: Wait for folder restarts to complete (fixes #5233) (#5239) 2018-10-05 09:26:25 +01:00
todos all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
uraggregate cmd/uraggregate, cmd/ursrv: Add missing copyright headers 2018-09-09 15:52:59 +02:00
ursrv cmd/uraggregate, cmd/ursrv: Add missing copyright headers 2018-09-09 15:52:59 +02:00
.gitignore Remove reprecated st* utils 2014-07-01 12:20:25 +02:00