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

cloud_storage: fix empty segment check in reader #10782

Closed
wants to merge 1 commit into from

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented May 15, 2023

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.

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
  • v23.1.x
  • v22.3.x
  • v22.2.x

Release Notes

  • none

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.
@jcsp jcsp added kind/bug Something isn't working area/cloud-storage Shadow indexing subsystem labels May 15, 2023
@jcsp jcsp requested review from andijcr and andrwng May 15, 2023 19:26
@jcsp jcsp marked this pull request as ready for review May 15, 2023 19:37
@jcsp
Copy link
Contributor Author

jcsp commented May 16, 2023

@jcsp
Copy link
Contributor Author

jcsp commented May 17, 2023

@jcsp jcsp closed this May 17, 2023
@jcsp
Copy link
Contributor Author

jcsp commented May 17, 2023

/backport v23.1.x

@jcsp
Copy link
Contributor Author

jcsp commented May 17, 2023

/backport v22.3.x

@vbotbuildovich
Copy link
Collaborator

The pull request is not merged yet. Cancelling backport...

Workflow run logs.

@vbotbuildovich
Copy link
Collaborator

The pull request is not merged yet. Cancelling backport...

Workflow run logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cloud-storage Shadow indexing subsystem area/redpanda kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants