Enable fetch cooldown in more cases#33781
Closed
blue42u wants to merge 3 commits intospack:developfrom
Closed
Conversation
Contributor
Author
|
@scottwittenburg Can you check if this fixes your cache fetch issue? |
Contributor
Yes, thanks, it does. With this change, each configured mirror that doesn't have an index seems to be checked just once. |
This was referenced Dec 4, 2022
Contributor
Author
|
Closing in favor of #34360 |
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.
...And hopefully reduce the number of FetchCacheErrors that bubble up.
My previous PRs (#32137 and #33509) added a cooldown between attempts to fetch a buildcache's
index.json, but only when the mirror had already been fetched once. The first of these two patches extends this to also include "new" mirrors that did not load an index into the cache, either due to failures or because there is noindex.json. (Note that this does not include mirrors that were deleted and re-added, the_last_fetch_timesentry is deleted in that case.)The second patch adjusts the usage in
find_by_hashto avoid throwing a FetchCacheError if the update fails. This function previously didn't throw exceptions, so keeping this from propagating reduces surprises in other locations.