-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cache: add timeout for groupcache's fetch operation #5206
Merged
GiedriusS
merged 5 commits into
thanos-io:main
from
GiedriusS:feature/add_groupcache_timeout
Mar 3, 2022
Merged
cache: add timeout for groupcache's fetch operation #5206
GiedriusS
merged 5 commits into
thanos-io:main
from
GiedriusS:feature/add_groupcache_timeout
Mar 3, 2022
Conversation
This file contains 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
Add a timeout for groupcache's fetch operation. It is useful when there are network errors - if loading from a peer fails then we still might have a chance to be able to load data from remote object storage ourselves. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
matej-g
reviewed
Mar 3, 2022
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
matej-g
previously approved these changes
Mar 3, 2022
docs/components/store.md
Outdated
@@ -441,6 +442,8 @@ In the `peers` section it is possible to use the prefix form to automatically lo | |||
|
|||
Note that there must be no trailing slash in the `peers` configuration i.e. one of the strings must be identical to `self_url` and others should have the same form. Without this, loading data from peers may fail. | |||
|
|||
If timeout is set to zero then there is no timeout for fetching and fetching's lifetime is equal to the lifetime to the original request's lifetime. It is recommended to keep it more than zero. It is generally preferred to keep this value higher because the fetching operation potentially includes loading that data from remote object storage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nits:
Suggested change
If timeout is set to zero then there is no timeout for fetching and fetching's lifetime is equal to the lifetime to the original request's lifetime. It is recommended to keep it more than zero. It is generally preferred to keep this value higher because the fetching operation potentially includes loading that data from remote object storage. | |
If timeout is set to zero then there is no timeout for fetching and fetching's lifetime is equal to the lifetime to the original request's lifetime. It is recommended to keep it higher than zero. It is generally preferred to keep this value higher because the fetching operation potentially includes loading of data from remote object storage. |
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
matej-g
approved these changes
Mar 3, 2022
GiedriusS
added a commit
to vinted/thanos
that referenced
this pull request
May 11, 2022
* cache: add timeout for groupcache's fetch operation Add a timeout for groupcache's fetch operation. It is useful when there are network errors - if loading from a peer fails then we still might have a chance to be able to load data from remote object storage ourselves. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com> * CHANGELOG: add entry Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com> * cache: add yaml tag for new field Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com> * cache: bump default timeout, improve docs Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com> * docs: make changes according to Matej's suggestions Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
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.
Add a timeout for groupcache's fetch operation. It is useful when there
are network errors - if loading from a peer fails then we still might
have a chance to be able to load data from remote object storage
ourselves.
Signed-off-by: Giedrius Statkevičius giedrius.statkevicius@vinted.com
Changes
Added creation of a new context with the specified deadline if it is not zero.
Verification
N/A