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

[v22.3.x] cloud_storage: fix empty segment check in reader #10869

Conversation

michael-redpanda
Copy link
Contributor

Backport of PR #10782
Fixes #10845

This was incorrectly offsetting the next kafka offset
by 1.

A segment with kafka data in it has a next offset != its
base offset, while a segment _without_ kafka data has a next
offset == its base offset.

This was ignored by unit tests because the tests were
using segment name format v1 which ignores delta_offset_end,
and ignored by integration tests because if our reader path
drops out then the client will retry, and because it only
causes the problem if a segment has exactly one data
batch in it.

(cherry picked from commit 92cbc1a)
@michael-redpanda michael-redpanda added the kind/backport PRs targeting a stable branch label May 18, 2023
@michael-redpanda michael-redpanda added this to the v22.3.x-next milestone May 18, 2023
@michael-redpanda michael-redpanda self-assigned this May 18, 2023
@michael-redpanda michael-redpanda merged commit 0336553 into redpanda-data:v22.3.x May 19, 2023
8 checks passed
@vshtokman vshtokman modified the milestones: v22.3.x-next, v22.3.21 May 31, 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.

None yet

4 participants