Limit concurrent operations for local / sftp backend#3475
Merged
fd0 merged 3 commits intorestic:masterfrom Apr 9, 2022
Merged
Conversation
This was referenced Aug 18, 2021
8 tasks
71325d7 to
b347f82
Compare
Use a limit of 2 similar to the filereader concurrency in the archiver.
b347f82 to
ece06f1
Compare
fd0
approved these changes
Apr 9, 2022
Member
fd0
left a comment
There was a problem hiding this comment.
LGTM, just one question: why is the number of concurrent operations for the local backend 2, but for the sftp backend 5?
Member
Author
|
For the local backend the number is essentially the same as the default from the archiver while reading data. SFTP usually has higher IO latency than a local backend so I've chosen a larger number of connections there. The value 5 is just the number that is also used for all other backends. |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR change? What problem does it solve?
Currently, the local and sftp backend are the only ones which do not limit the number of concurrent operations.
This PR adds a
Connectionsparameter for both backends along with the corresponding limits.Even though
Connectionssounds unusual for the local backend, I've kept the name for consistency with the other backends.Was the change previously discussed in an issue or on the forum?
Partially related to #322 and #2679
Checklist
[ ] I have added tests for all code changes.The backends already have a good test coverage.[ ] I have added documentation for relevant changes (in the manual).changelog/unreleased/that describes the changes for our users (see template).gofmton the code in all commits.