syncthing/lib
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
..
auto build: Let "go generate" create assets 2018-06-26 10:29:36 +02:00
beacon all, vendor: Switch back to non-forked thejerf/suture (#5171) 2018-09-08 12:56:56 +03:00
config lib/config: Add context to the home disk out of space error (#5241) 2018-10-05 08:21:39 +02:00
connections lib/connections: Don't info log about LAN if there are no rate limits (#5242) 2018-10-05 08:22:47 +02:00
db lib/db: Improve VersionList.String (#5229) 2018-09-26 23:30:22 +02:00
dialer lib/dialer: Register dialer for socks URL scheme (fixes #4515) 2017-12-08 12:04:43 +00:00
discover all, vendor: Switch back to non-forked thejerf/suture (#5171) 2018-09-08 12:56:56 +03:00
events all: Fix FS watcher restarting and web UI indication (fixes #4923) (#4962) 2018-06-11 15:47:54 +02:00
fs lib/fs: Add fakefs (#5235) 2018-10-02 19:29:06 +01:00
ignore lib/ignore, lib/scanner: Fix recursion to catch included paths (fixes #5009) (#5010) 2018-06-18 08:22:19 +02:00
logger lib/logger: Add missing dots (fixes #5073) 2018-07-19 20:49:57 +02:00
model lib/model, cmd/syncthing: Wait for folder restarts to complete (fixes #5233) (#5239) 2018-10-05 09:26:25 +01:00
nat lib/nat: Fix clearAddresses/notify deadlock (ref #4601) (#4829) 2018-03-21 08:02:32 +01:00
osutil all: Adjust windows perms in fs package (#5200) 2018-09-16 16:09:56 +02:00
pmp all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
protocol all: Check files on disk/in db when deleting/renaming (fixes #5194) (#5195) 2018-09-16 09:48:14 +02:00
rand all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
rc test: Mend tests for latest event changes etc 2017-11-13 00:25:07 +01:00
relay all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
scanner lib/scanner: Centralise protocol.FileInfo creation (#5202) 2018-09-18 15:34:17 +02: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 cmd/syncthing, lib/sync: Don't do deadlock detection when STDEADLOCKTIMEOUT=0 (fixes #4644) 2018-01-15 13:33:52 +00:00
tlsutil lib/tlsutil: Remove undesired bufio from UnionedConnection (ref #4245) 2017-08-31 07:34:48 +00:00
upgrade lib/upgrade: Tests should pass on darwin-386 2018-06-06 09:47:13 +02:00
upnp lib/upnp: Don’t log unknown device types (fixes #5038) (#5087) 2018-07-30 16:34:35 +02:00
util lib/config, lib/model: Tweaks to the auto accept feature 2017-12-07 08:33:32 +00:00
versioner lib/versioner: Fix external versioner command specification on Windows (fixes #4560) 2018-02-07 14:12:27 +00:00
watchaggregator lib/watchaggregator: Don't delay mixed events only (#5094) 2018-08-13 09:14:03 +02:00
weakhash lib/model, lib/weakhash: Abort pulling quicker on folder stop (ref #5028) 2018-07-04 08:07:33 +01:00