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

[v23.2.x] archival: start reupload range after log start #14839

Merged

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #14816

@vbotbuildovich vbotbuildovich added this to the v23.2.x-next milestone Nov 8, 2023
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Nov 8, 2023
@piyushredpanda piyushredpanda marked this pull request as ready for review November 14, 2023 21:13
@dotnwat
Copy link
Member

dotnwat commented Nov 15, 2023

I'm pretty sure @andrwng wants to hold off on this for after .16

@piyushredpanda
Copy link
Contributor

/ci-repeat 1

@piyushredpanda
Copy link
Contributor

@andrwng The build seems to be failing.

CONFLICT:
- removed windowed compaction bit

After a delete-records request, when collecting segments to determine
the next upload candidate, we could end up trying to build an upload
candidate with a start offset lower than the local log. Consider the
following sequence:

- Segment [0, 200)[200-400) are merge compacted ==> [0, 400).
- Delete records ==> start offset is now 1.
- Reupload our first compacted segment so we look up offset 1, realign the
  collection start target to a remote segment 200.
- We collect segments starting from 200, getting [0, 400).
- Collector gets realigned to 0 since it's the first segment. The collector now
  thinks it should be uploading [0, 400).
- In building the upload candidate, we try to translate the range start and
  fail because the range start 0 is lower than the translation range start 1.

This fixes this sequence to return [200, 400) as the start of the upload
candidate.

(cherry picked from commit b26d1e9)
@andrwng andrwng force-pushed the backport-pr-14816-v23.2.x-481 branch from 6f58456 to 88aee86 Compare November 19, 2023 00:45
@andrwng
Copy link
Contributor

andrwng commented Nov 19, 2023

@andrwng The build seems to be failing.

Thanks for the ping! Pushed an update

@andrwng andrwng merged commit bb3ad60 into redpanda-data:v23.2.x Nov 19, 2023
24 checks passed
@piyushredpanda piyushredpanda modified the milestones: v23.2.x-next, v23.2.17 Nov 19, 2023
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.

5 participants