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

remove boltdb files from ingesters on startup which do not have a index bucket #3929

Conversation

sandeepsukhani
Copy link
Contributor

What this PR does / why we need it:
A bug caused an ingester to crash, which had just created a new index file for writes but failed to write to it, including missing creating a bucket. When the ingester came back up, it uploaded the index file without the index bucket. Since all the boltdb files are expected to have it, the compactor started failing to compact the files.

This PR fixes the issue by validating existing boltdb files on ingester startup to see if they have an index bucket. If not, they would be removed.

Checklist

  • Tests updated

Copy link
Collaborator

@kavirajk kavirajk left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉

@sandeepsukhani sandeepsukhani merged commit 43c16ed into grafana:main Jul 1, 2021
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.

None yet

2 participants