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.2.x] archival: bump offset if seeking undershoots (manual backport) #24106

Merged

Conversation

WillemKauf
Copy link
Contributor

@WillemKauf WillemKauf commented Nov 12, 2024

Manual backport of #23937.

Cherry-pick conflicts due to modified bazel BUILD file that doesn't exist in v24.2.x.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.2.x
  • v24.1.x
  • v23.3.x

Release Notes

Bug Fixes

  • Fixes a bug in which upload candidates made from segments with missing batches would trigger metadata related errors in the ntp_archiver_service, due to assigned start offsets being lower than they should be.

andrwng and others added 3 commits November 12, 2024 15:41
convert_begin_offset_to_file_pos can undershoot, in which case the
metadata returned by the archival policy won't perfectly align with the
caller's expectations. This could result in an offset_overlap when
applying the upload metadata.

It's unclear exactly why there are missing batches, given this code is
used for the non-compacted uploader. But the fix is simple enough, and
is one that we use in the compacted upload policy already[1].

[1] https://github.com/redpanda-data/redpanda/blob/4b8135ea5dbdca322ccf8efc85424413a20c5ade/src/v/archival/segment_reupload.cc#L516-L522

(cherry picked from commit 8b616df)
The headers are often a go-to place for information about the behavior
callers should expect from a method. Adds some details explaining at a
high level what to expect from a couple of methods.

(cherry picked from commit ff120d0)
(cherry picked from commit 5f18ba9)
@WillemKauf WillemKauf force-pushed the backport-pr-23937-v24.2.x-196 branch from ad272e8 to bfb2e8c Compare November 13, 2024 14:02
@WillemKauf WillemKauf requested a review from Lazin November 13, 2024 17:03
@WillemKauf WillemKauf merged commit 21f64b2 into redpanda-data:v24.2.x Nov 13, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants