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

log name of the file failed to open during startup by ingester #3970

Merged

Conversation

sandeepsukhani
Copy link
Contributor

What this PR does / why we need it:
When an active index file is corrupted due to Loki/Ingester abruptly stopping, it causes Loki/Ingester to fail to start.
We automatically clean up a corrupted file in the boltdb-cache, which we can download again from the object store, but we can't recover a file corrupted in the active index directory.

I would not prefer to remove the corrupt file without someone intervening manually because a corrupt file means something is wrong, and that happening frequently could cause data loss. So this PR keeps the behaviour the same but lets the user know which file is corrupt to either try to fix it or remove it.

Which issue(s) this PR fixes:
Helps fix Loki failing to start due to a corrupt file on the write path as noticed in #3219

Copy link
Contributor

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

👍

@sandeepsukhani sandeepsukhani merged commit 0cd8f31 into grafana:main Jul 8, 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.

3 participants