[v25.2.x] [CORE-6913] Cloud Storage Scrubber: Fix false positive for replaced segments#30120
Open
vbotbuildovich wants to merge 2 commits intoredpanda-data:v25.2.xfrom
Open
Conversation
The scrub false-positive filter in process_anomalies() only checked whether a segment with the same offset range existed in the manifest. A compacted reupload produces a replacement segment at the same offset range but with a different name (different size). When GC deleted the old segment from cloud storage while the scrubber was still referencing a stale manifest, the filter kept the anomaly because the offset range still matched—even though the current segment at that range was a different (replacement) object that existed in cloud storage. Compare generate_remote_segment_name() for the manifest entry and the reported-missing segment so that replacements with the same offset range but different identity are correctly recognized as false positives. Fixes CORE-6913. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> (cherry picked from commit c3d965a)
Test for race between scrubber and compacted segment reupload: 1. Create manifest with 3 segments, remove the middle one from cloud storage so the detector reports it missing 2. Replace it in the manifest with a compacted version at the same offset range but different size_bytes 3. Assert generate_remote_segment_name() differs for the original vs compacted segment (v2/v3 names encode size) 4. Call process_anomalies() and assert the anomaly is filtered out as a false positive Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> (cherry picked from commit 34185af)
Collaborator
Author
CI test resultstest results on build#82993
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of PR #30062