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

Merged
merged 5 commits into from
Nov 13, 2024

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.1.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 4 commits November 12, 2024 15:38
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)
Copy link
Contributor

@Lazin Lazin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build is failing

@Lazin Lazin merged commit 05a596c into redpanda-data:v24.1.x Nov 13, 2024
16 checks passed
@BenPope BenPope added this to the v24.1.18 milestone Nov 18, 2024
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.

4 participants