[cloud_storage] segment_meta_cstore::prefix_truncate fix range of _hints to remove #11119
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.
it
should point to the first hint that needs to be removed. Previously it was computed with upper_bound, but this means that it will never point to a value that's equal to frame_max_offset, meaning that that hint value could be left behind, pointing incorrectly at an offset that's no longer valid.to find the issue, this test was extracted from cloud_storage_basic_rptest suite
https://github.com/andijcr/redpanda/blob/issue/10602/exceptional_future_ignored/src/v/cloud_storage/tests/partition_manifest_outofrange.cc
function
test_partition_manifest
repeatedly exercises partition_manifest::truncate, and the high randomized repetition count ensures that the exception is triggered.this assertion https://github.com/andijcr/redpanda/blob/issue/10602/exceptional_future_ignored/src/v/cloud_storage/segment_meta_cstore.cc#L646-L648 (not included in this pr) checks that std::prev(it)->first is greater than frame_max_offset, and thus lies after the frame that will be reconstructed. it will be triggered with upper_bound but not with lower_bound
FIxes #10983
Backports Required
Release Notes