Jakob Borg and GitHub
253049a4cc
lib/api, lib/model: Avoid contention on filesystem for DB status call (ref #7270 ) ( #7271 )
...
This splits the ignore getting to two methods, one that loads from disk
(the old one) and one that just returns whatever is already loaded (the
new one). The folder summary service which is just interested in stats
now uses the latter method. This means that it, and API calls that call
it, does not get blocked by folder I/O.
2021-01-12 16:25:21 +01:00
Jakob Borg and GitHub
8f199e12b3
lib/fs, lib/model: Reduce lock contention on NewCaseFilesystem ( fixes #7268 ) ( #7269 )
2021-01-12 16:22:21 +01:00
Jakob Borg and GitHub
0b193b76c2
lib/config, lib/connections: Add optional connection limits ( fixes #7176 ) ( #7223 )
...
This adds two new configuration options:
// The number of connections at which we stop trying to connect to more
// devices, zero meaning no limit. Does not affect incoming connections.
ConnectionLimitEnough int
// The maximum number of connections which we will allow in total, zero
// meaning no limit. Affects incoming connections and prevents
// attempting outgoing connections.
ConnectionLimitMax int
These can be used to limit the number of concurrent connections in
various ways.
2021-01-11 15:14:44 +01:00
Jakob Borg and GitHub
b13b15758d
lib/connections, lib/model: Track last connection duration (ref #7223 ) ( #7242 )
...
This adds a statistic to track the last connection duration per device.
It isn't used for much in this PR, but it's available for #7223 to use
in deciding how to order device connection attempts (deprioritizing
devices that just dropped our connection the last time).
2021-01-05 17:45:07 +01:00
Simon Frei and GitHub
c48eb4241a
lib/model: Fix child-check when deleting dirs in pull ( #7236 )
2021-01-02 21:40:37 +01:00
Simon Frei and GitHub
0f8290485e
lib/model: Handle index sender terminating due to error ( fixes #7231 ) ( #7232 )
2020-12-30 09:59:11 +01:00
Simon Frei and GitHub
a05dc6cc47
lib/model: Cleanup redundant filesystem variables in folders ( #7237 )
2020-12-27 22:26:25 +01:00
Simon Frei and GitHub
f13e6ca631
lib/model: Remove obsolete return val from ccHandleFolders (ref #6443 ) ( #7229 )
2020-12-23 13:10:08 +01:00
Simon Frei and GitHub
a20a5f61f0
lib/ur: Send unreported failures on shutdown ( #7164 )
2020-12-22 20:17:14 +01:00
Simon Frei and GitHub
78bd0341a8
all: Handle errors opening db/creating file-set (ref #5907 ) ( #7150 )
2020-12-21 12:59:22 +01:00
Simon Frei and GitHub
c845e245a1
lib: Close underlying conn in protocol ( fixes #7165 ) ( #7212 )
2020-12-21 11:40:51 +01:00
Simon Frei and GitHub
d904dfa191
lib/model: Fix flaky test and add some scanning debug ( #7214 )
2020-12-20 18:13:35 +01:00
Simon Frei and GitHub
fa40ccece1
lib: Consistently set suture logging ( #7202 )
2020-12-18 19:44:00 +01:00
Simon Frei and GitHub
7919310dc6
lib/model: Unflake TestIgnoreDeleteUnignore ( #7208 )
2020-12-18 18:42:09 +01:00
André Colomb and GitHub
7502997e7e
all: Store pending devices and folders in database ( fixes #7178 ) ( #6443 )
2020-12-17 19:54:31 +01:00
Jakob Borg
4142a431b5
model: Actually print folder description in "Overriding" log message
2020-12-12 12:32:24 +01:00
Simon Frei and GitHub
240ae0c14f
lib/model: Unflake TestRequestReceiveEncryptedLocalNoSend ( #7167 )
2020-11-27 20:53:03 +01:00
Simon Frei and GitHub
a9764fc16c
lib: Skip deleted, locally changed on recv-enc folders ( fixes #7153 ) ( #7154 )
2020-11-27 11:26:36 +01:00
Simon Frei and GitHub
bf7d03d029
lib/model: Fix enc file size when pulling ( fixes #7152 ) ( #7155 )
2020-11-25 22:57:25 +01:00
Simon Frei and GitHub
54b50e3d52
lib/fs, lib/model: Cover more windowsyness sanitizing paths ( fixes #7075 ) ( #7158 )
2020-11-25 22:52:46 +01:00
André Colomb and GitHub
e6595c1ab9
lib/model: Simplify access to Folder and Device configuration. ( #7151 )
...
Use the accessor methods with a device argument instead of looking up
in a temporary map of the same data.
2020-11-24 22:20:50 +01:00
Simon Frei and GitHub
100ef10d84
lib/model: Don't send locally changed on recv-enc ( fixes #7137 ) ( #7147 )
2020-11-24 21:49:45 +01:00
Simon Frei and GitHub
db1f20603a
lib/model: Retain index info for new folders/devs (ref #7100 ) ( #7133 )
2020-11-20 15:53:13 +01:00
Simon Frei and GitHub
24af89c8e2
all: Refactor preparing configuration ( #7127 )
2020-11-20 14:21:54 +01:00
Simon Frei and GitHub
b43eccf2fe
lib/model: Never send unpaused folder without index info ( #7134 )
2020-11-20 14:13:50 +01:00
Simon Frei and GitHub
e11b309379
lib/model, lib/util: Replace IsComplete with NoRestartErr (ref #6947 ) ( #7126 )
2020-11-18 13:43:57 +01:00
Simon Frei and GitHub
2d3a535ced
lib/model: Handle cluster-config before folder start ( fixes #7122 ) ( #7123 )
2020-11-17 15:30:21 +01:00
Simon Frei and GitHub
9524b51708
all: Implement suture v4-api ( #6947 )
2020-11-17 13:19:04 +01:00
Simon Frei and GitHub
b8051fb37e
lib/model: Prevent test deadlock ( #7110 )
2020-11-10 12:32:07 +01:00
Simon Frei and GitHub
31559e908b
all: Add untrusted folders behind feature flag (ref #62 ) ( #7055 )
2020-11-09 15:33:32 +01:00
Simon Frei and GitHub
54643e86b5
lib/model: Fix locking when resending cluster-configs ( #7107 )
2020-11-09 14:05:21 +01:00
Simon Frei and GitHub
1f1729ba43
lib/model: Add done chan to track folder-lifetime ( fixes #6664 ) ( #7094 )
2020-11-09 09:05:48 +01:00
Simon Frei and GitHub
d4ce0dfd84
lib/model: Send indexes for newly shared folder ( fixes #7098 ) ( #7100 )
2020-11-09 08:58:46 +01:00
Simon Frei and GitHub
cc9ea9db89
lib/folder: Clear pull errors when nothing is needed anymore ( #7093 )
2020-11-06 14:22:20 +01:00
Simon Frei and GitHub
1c2be84e4e
lib/model: Pass device infos as struct ( fixes #7051 ) ( #7052 )
2020-10-22 13:05:31 +02:00
Simon Frei and GitHub
5c91723ef2
lib/model: Handle index sender lifetime ( fixes #7034 ) ( #7038 )
2020-10-21 11:51:53 +02:00
Simon Frei and GitHub
27c91c57d5
lib/db: Remove need for the right dev removing globals ( fixes #7036 ) ( #7044 )
2020-10-21 08:26:10 +02:00
Simon Frei and GitHub
1a8c10a8d0
lib/model: Use winning version instead of merge on conflict ( #6995 )
2020-10-19 08:53:19 +02:00
Simon Frei and GitHub
9d09fd6af3
all: Add failure reporting ( fixes #7028 ) ( #6925 )
2020-10-07 10:05:13 +02:00
Simon Frei and GitHub
42de53c6c9
lib/model: Fix race in GlobalDirectory tests ( fixes #7021 ) ( #7022 )
2020-10-03 20:46:17 +02:00
Simon Frei and GitHub
48da6f0f22
lib: Use uint64 for disk stats (ref #3930 ) ( #7019 )
2020-10-02 15:22:28 +02:00
Simon Frei and GitHub
a20c6ca868
lib/model, lib/protocol: Send ClusterConfig on config change ( fixes #7020 ) ( #7018 )
2020-10-02 11:49:51 +02:00
Audrius Butkevicius and GitHub
e027175446
all: Move remaining protos to use the vanity plugin ( #7009 )
2020-10-02 08:07:05 +02:00
Simon Frei and GitHub
1b1d38183d
lib: Remove HelloResult type, same as Hello ( #7015 )
2020-09-29 12:17:38 +01:00
Jakob Borg and GitHub
9e0b924d57
lib/fs: Be more clear about invalid file names (ref #7010 ) ( #7011 )
...
Add specific errors for the failures, resulting in this rather than just
the generic "invalid filename":
[MRIW7] 08:50:50 INFO: Puller (folder default, item "NUL"): syncing: filename is invalid: name is reserved
[MRIW7] 08:50:50 INFO: Puller (folder default, item "fail."): syncing: filename is invalid: name ends with space or period
[MRIW7] 08:50:50 INFO: Puller (folder default, item "sup:yo"): syncing: filename is invalid: name contains reserved character
[MRIW7] 08:50:50 INFO: default: Failed to sync 3 items
2020-09-28 10:22:50 +02:00
Simon Frei and GitHub
8452fd2ab4
lib/model, lib/scanner: Prevent races aborting scans ( fixes #6994 ) ( #6997 )
2020-09-25 11:27:44 +02:00
Simon Frei and GitHub
8210466b03
lib/model: Consider case conflicts when checking to be deleted items ( #6986 )
2020-09-12 07:45:50 +02:00
Simon Frei and GitHub
08bebbe59b
lib/db, lib/syncthing: Don't repair DB on upgrade, but on error ( fixes #6917 ) ( #6971 )
2020-09-10 10:54:41 +02:00
Simon Frei and GitHub
c5c23ed10f
lib/model: Consider existing file when handling symlink on windows ( #6977 )
2020-09-10 10:52:38 +02:00
Simon Frei and GitHub
286698ccb1
lib/model: Handle symlink deletion on windows ( fixes #6972 ) ( #6976 )
2020-09-10 08:25:44 +02:00