Skip to content
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

querier: don't cache context.Canceled errors for bucket index #7620

Conversation

dimitarvdimitrov
Copy link
Contributor

What this PR does

Without a cached bucket index the querier will synchronously fetch the bucket index while the query is on hold. If the query is cancelled, then the error will be cached and future queries would return the error until the next periodic bucket index update (after 1 minute).

Which issue(s) this PR fixes or relates to

Fixes #7586 (comment)

Checklist

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

Without a cached bucket index the querier will synchronously fetch the bucket index while the query is on hold. If the query is cancelled, then the error will be cached and future queries would return the error until the next periodic bucket index update (after 1 minute).

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
@dimitarvdimitrov dimitarvdimitrov requested a review from a team as a code owner March 13, 2024 15:35
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Copy link
Member

@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.

Thanks.

"cortex_bucket_index_loads_total",
"cortex_bucket_index_load_failures_total",
"cortex_bucket_index_loaded",
))
Copy link
Member

Choose a reason for hiding this comment

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

Shall we request index one more time with non-canceled context to show that it succeeds?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done in a96308c

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
@dimitarvdimitrov dimitarvdimitrov enabled auto-merge (squash) March 15, 2024 10:00
@dimitarvdimitrov dimitarvdimitrov merged commit 0fedf8c into main Mar 15, 2024
29 checks passed
@dimitarvdimitrov dimitarvdimitrov deleted the dimitar/querier/dont-caceh-context-cancelatio-on-bucket-index-fetches branch March 15, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants