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

[v24.1.x] CORE-6835 Fix first time compacted segment upload #22926

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #22812

The test creates compacted topic without TS. It produces the data and
waits until the data is compacted. After that it enables TS for the
topic. The archiver has to be able to upload the data.

(cherry picked from commit 9bbe429)
The archival_policy::find_segment method has a bug which causes it to
skip compacted segments unconditionally. The code checks if the segment
that it found is compacted and if this is the case it advances the
iterator to the next segment. This operation causes ntp_archiver to skip
one segment. The uploaded segment doesn't line up with the previous one
so the validation error is triggered.

The commit also implements handling of gaps in a safe way. We're not
supposed to have gaps in the log (even in compacted logs) so the
implementation has linear complexity. It's not supposed to be used and
is good enough to hadnle unexpected unique glitch.

(cherry picked from commit de01321)
The test validates logic which was removed. Previousy, the uploader was
skipping single compacted segment and now it will upload compacted
segments. So the upload in the test should start from 0.

(cherry picked from commit e2fd980)
@vbotbuildovich vbotbuildovich added this to the v24.1.x-next milestone Aug 17, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Aug 17, 2024
@piyushredpanda piyushredpanda merged commit c6babce into redpanda-data:v24.1.x Aug 19, 2024
19 checks passed
@piyushredpanda piyushredpanda modified the milestones: v24.1.x-next, v24.1.15 Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants