Skip to content

Finish polling current tenants before shut down #4897

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 7 commits into from
Mar 31, 2025

Conversation

zalegrala
Copy link
Contributor

@zalegrala zalegrala commented Mar 24, 2025

What this PR does:

Currently, the module context is passed to the poller. In the event of a termination request, this context is used on the backend reader/writer and fail because of the cancellation. Here we use a background context for the polling so that once a poll for a tenant has started to ensure the index is written. The store module is updated to block shutdown until the poller is done. This is necessary because the polling process is run in a routine, and during rollout of the index-writers, we see alerts due to stale index. Allowing the poller to complete tenants which it has started should improve this siutaiton.

Which issue(s) this PR fixes:
Fixes #

Checklist

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

Copy link
Contributor

@mapno mapno left a comment

Choose a reason for hiding this comment

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

LGTM. It's missing the changelog entry.

@zalegrala zalegrala merged commit ff83648 into grafana:main Mar 31, 2025
15 checks passed
@zalegrala zalegrala deleted the pollerShutdown branch March 31, 2025 14:40
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.

2 participants