Re-fetch buckets if fetching them failed #3999
Merged
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.
I decided against a
setTimeout
for themarkAsFailed(false)
, because buckets cannot be collected if their state is "REQUESTED". The scheduling of the re-fetching would, therefore, mess with the garbage collection. As far as we know, bucket requests to the server only fail if the server is not ready yet (in dev mode) or if the user if offline. Also, buckets are only re-fetched when moving.I traced back the catch clause to the separation of the datastore and tracingstore, so it was introduced to allow the "retry-fetching-from-the-fallback-layer" logic. As the server reports missing buckets using the explicit header for all layers now, we're merely restoring the status quo from before that change :)
URL of deployed dev instance (used for testing):
Steps to test:
Issues: