Repository navigation
lib/config, lib/model: Limit concurrent pulls (fixes #5914) - #6290
Conversation
Adds a new folder state "Waiting to Sync" in the same vein as the existing "Waiting to Scan". This vastly improves performances in the rare cases when there are lots and lots of folders operating.
AudriusButkevicius
left a comment
There was a problem hiding this comment.
lgtm in principle.
| cfgFile := fmt.Sprintf("testdata/v%d.xml", i) | ||
| if _, err := os.Stat(cfgFile); os.IsNotExist(err) { | ||
| continue | ||
| } |
There was a problem hiding this comment.
We should also get rid of the noop files that we've produced over the years.
| // If a value is set, trust that. | ||
| if opts.MaxConcurrentFolders > 0 { | ||
| return opts.MaxConcurrentFolders | ||
| } |
There was a problem hiding this comment.
I guess you want people to set it to 999 for "unlimited"?
There was a problem hiding this comment.
I was intending -1 to mean unlimited as usual, but I see now that I didn't implement that.
| <device id="MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" introducedBy=""></device> | ||
| </folder> | ||
| EOT | ||
| done No newline at end of file |
There was a problem hiding this comment.
Tiny script to generate lots of folder entries for testing; I had to write it several times so thought I might as well check it in 🤷♂
| DefaultFolderPath string `xml:"defaultFolderPath" json:"defaultFolderPath" default:"~"` | ||
| SetLowPriority bool `xml:"setLowPriority" json:"setLowPriority" default:"true"` | ||
| MaxConcurrentScans int `xml:"maxConcurrentScans" json:"maxConcurrentScans"` | ||
| RawMaxConcurrentFolders int `xml:"maxConcurrentFolders" json:"maxConcurrentFolders"` |
There was a problem hiding this comment.
MaxFolderConcurrency? Current one reads badly and doesn't really explain what it does. Feels like a limit of how many folders I can have.
AudriusButkevicius
left a comment
There was a problem hiding this comment.
Naming nitpick, otherwise, lgtm
|
Valid point, I fix |
92ede6c
* master: (28 commits) gui, man, authors: Update docs, translations, and contributors lib/config, lib/model: Limit concurrent pulls (fixes syncthing#5914) (syncthing#6290) lib/db: Fixup last commit with better key name lib/db: Configurable block GC time (syncthing#6295) lib/db: Deduplicate block lists in database (fixes syncthing#5898) (syncthing#6283) lib/relays: Fix incorrect timeout, bring back logging (ref syncthing#6289) (syncthing#6291) gui, man, authors: Update docs, translations, and contributors all: Transactionalize db.FileSet (fixes syncthing#5952) (syncthing#6239) lib/model: Handle progress emitter zero interval (fixes syncthing#6281) (syncthing#6282) build(deps): bump github.com/pkg/errors from 0.9.0 to 0.9.1 (syncthing#6279) cmd/syncthing: Always use monitor process (fixes syncthing#4774, fixes syncthing#5786) (syncthing#6278) lib/syncthing: Wait for actual termination on Stop() (syncthing#6277) lib/model: Remove legacy handling of symlinks (syncthing#6276) lib/model: Return paused summary instead of error on paused folders (syncthing#6272) lib/config: Add some info to the folder marker missing (ref syncthing#5207) (syncthing#6270) assets, gui: Losslessly compress all JPG, PNG, and PDF images (syncthing#6265) cmd/strelaypoolsrv: Serve gzip compressed responses gui, man, authors: Update docs, translations, and contributors gui, man, authors: Update docs, translations, and contributors build: go mod tidy ...
* master: (32 commits) gui, man, authors: Update docs, translations, and contributors lib/config, lib/model: Limit concurrent pulls (fixes syncthing#5914) (syncthing#6290) lib/db: Fixup last commit with better key name lib/db: Configurable block GC time (syncthing#6295) lib/db: Deduplicate block lists in database (fixes syncthing#5898) (syncthing#6283) lib/relays: Fix incorrect timeout, bring back logging (ref syncthing#6289) (syncthing#6291) gui, man, authors: Update docs, translations, and contributors all: Transactionalize db.FileSet (fixes syncthing#5952) (syncthing#6239) lib/model: Handle progress emitter zero interval (fixes syncthing#6281) (syncthing#6282) build(deps): bump github.com/pkg/errors from 0.9.0 to 0.9.1 (syncthing#6279) cmd/syncthing: Always use monitor process (fixes syncthing#4774, fixes syncthing#5786) (syncthing#6278) lib/syncthing: Wait for actual termination on Stop() (syncthing#6277) lib/model: Remove legacy handling of symlinks (syncthing#6276) lib/model: Return paused summary instead of error on paused folders (syncthing#6272) lib/config: Add some info to the folder marker missing (ref syncthing#5207) (syncthing#6270) assets, gui: Losslessly compress all JPG, PNG, and PDF images (syncthing#6265) cmd/strelaypoolsrv: Serve gzip compressed responses gui, man, authors: Update docs, translations, and contributors gui, man, authors: Update docs, translations, and contributors build: go mod tidy ...
Purpose
Adds a new folder state "Waiting to Sync" in the same vein as the existing "Waiting to Scan". This vastly improves performances in the rare cases when there are lots and lots of folders operating.
I also changed the default zero value to mean "limit to num-cpu-cores" instead of "no limit".
Testing
I've run it a bunch and looked in the GUI...