-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Tools bucket verify must validate chunks #4881
Comments
#3031 This pr already supports storing hashes in the metadata file. It is also possible to read each chunk data on the fly from the object store. |
Thanks for your reply @yeya24 👍 |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
Closing for now as promised, let us know if you need this to be reopened! 🤗 |
Still needed |
Still needed. We don't have a good way to fix (or at least identify) corrupted chunks. |
Is your proposal related to a problem?
After an S3 outage, some data has been corrupted or removed and caused compactor and store errors because some chunk files was missing.
Error log :
Describe the solution you'd like
The S3 datacenter has been fixed, but I need to check if all blocks of buckets are valid. To validate all my blocks I used the command
thanos tools bucket verify
but it just validates the index. A missing chunk or a corrupted chunk is not detected. Thethanos tools bucket verify
must validate the hash of the chunk file. The Prometheus TSDB already do that https://github.com/prometheus/prometheus/blob/main/tsdb/chunks/chunks.go#L549 and the promtool cli to https://github.com/prometheus/prometheus/blob/main/cmd/promtool/tsdb.go#L602 but we need to download all the chunks and the index file and It could be very expensive and slow on large blocks (size++, duration++). I like your proposal @bwplotka #1787 to store the hash of the chunks into metadata file. Like that we can just request to the remote storage the metadata of the chunk to retrieve the hash and compare it. With this solution we don't have to download chunks files. Maybe this implementation could be done at this line https://github.com/thanos-io/thanos/blob/main/pkg/block/index.go#L319 ?Describe alternatives you've considered
Additional context
RAS
The text was updated successfully, but these errors were encountered: