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

fetcher: sanity check metas for common corruptions #7282

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MichaHoffmann
Copy link
Contributor

@MichaHoffmann MichaHoffmann commented Apr 16, 2024

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Mark metas with incomplete files as corrupted. Once shipper uploads the meta, the block is considered complete. This should make it possible to use the "Files" field in meta for a cheap check if the block is valid if its already in object storage. Neither storage-gw nor compactor can handle incomplete blocks, so this should fix a couple runtime issues; produce metrics and automatically clean up this issue.

Added a flag to disable cleanup of partially uploaded blocks that defaults to true.

Verification

Added unittests

Should solve #6328

pkg/block/fetcher.go Outdated Show resolved Hide resolved
pkg/block/fetcher.go Outdated Show resolved Hide resolved
pkg/block/fetcher.go Outdated Show resolved Hide resolved
@MichaHoffmann MichaHoffmann force-pushed the mhoffm/sanity-check-metas-in-fetcher branch from d87db53 to 59e33b9 Compare April 16, 2024 07:21
@pull-request-size pull-request-size bot added size/L and removed size/M labels Apr 16, 2024
@MichaHoffmann MichaHoffmann force-pushed the mhoffm/sanity-check-metas-in-fetcher branch 2 times, most recently from ed43466 to a7b5d56 Compare April 16, 2024 07:25
@MichaHoffmann MichaHoffmann marked this pull request as ready for review April 16, 2024 07:27
@MichaHoffmann MichaHoffmann changed the title WIP block: sanity check metas for common corruptions fetcher: sanity check metas for common corruptions Apr 16, 2024
@MichaHoffmann MichaHoffmann force-pushed the mhoffm/sanity-check-metas-in-fetcher branch from a7b5d56 to e730d58 Compare April 16, 2024 10:12
Santiy check metas that are returned from fetcher for common issues. We
currently return metas that will lead to crashes in compactor and store,
this PR marks them as corrupted so that they will get cleaned up and are
visible in metrics.

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
@MichaHoffmann MichaHoffmann force-pushed the mhoffm/sanity-check-metas-in-fetcher branch from e730d58 to 84ab6a0 Compare April 16, 2024 10:16
Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
@MichaHoffmann MichaHoffmann marked this pull request as draft April 16, 2024 13:12
Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
@MichaHoffmann MichaHoffmann force-pushed the mhoffm/sanity-check-metas-in-fetcher branch from c4f8a52 to cba520b Compare April 17, 2024 17:56
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