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

store-gateway: refactor BucketStore to have proper module lifecycle #8389

Closed
dimitarvdimitrov opened this issue Jun 17, 2024 · 2 comments · Fixed by #8610
Closed

store-gateway: refactor BucketStore to have proper module lifecycle #8389

dimitarvdimitrov opened this issue Jun 17, 2024 · 2 comments · Fixed by #8610

Comments

@dimitarvdimitrov
Copy link
Contributor

The BucketStore and the ReaderPool it uses need to start goroutines. It's hard to keep track of those and hard to clean them up. #8281 introduced another background goroutine. See

// The store-gateway BucketStore starts a goroutine in the index-header readers pool and
// it gets closed when we close the BucketStore. However, we currently don't close BucketStore
// on store-gateway termination so it never gets terminated.
goleak.IgnoreTopFunction("github.com/grafana/mimir/pkg/storegateway/indexheader.NewReaderPool.func1"),

The store-gateway would be easier to navigate and less prone to bugs if the BucketStore has proper lifecycle functions like start, run, and stop. Like a lot of other internal services.

This issue is a follow-up for this comment thread #8281 (comment)

@dimitarvdimitrov
Copy link
Contributor Author

related comment from @pracucci #8281 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant