Skip to content

Improve bucket index loader to handle edge cases #3717

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

Merged
merged 2 commits into from
Jan 21, 2021

Conversation

pracucci
Copy link
Contributor

What this PR does:
While rolling out the bucket index in our of our clusters I've noticed that we have some tenants with rules but not remote writing the cluster (or started very soon to remote write so their blocks haven't been uploaded to bucket yet). Since there are no blocks in the bucket, their bucket index doesn't exist and this leads the bucketindex.Loader to continuously try to load their bucket index.

In this PR I'm proposing 3 changes that should relief the pressure when such edge case happens:

  • Keep cached the "bucket index not found" error during background checks
  • Don't increase cortex_bucket_index_load_failures_total on ErrIndexNotFound error (we already didn't do in the background check)
  • In case of ErrIndexNotFound, update it every UpdateOnStaleInterval instead of UpdateOnErrorInterval

Which issue(s) this PR fixes:
N/A

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good job.

@pracucci pracucci merged commit f4208b5 into cortexproject:master Jan 21, 2021
@pracucci pracucci deleted the fix-bucket-index-loader branch January 21, 2021 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants