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] kafka: fix timequery failing for empty topics #19950

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #19937

This bug was introduced accidentally while trying to fix another
off-by-one bug in commit ref 8f2de96. I
forgot to account that for an empty topic the "start offset" is equal to
"last offset" so calling `model::prev_offset` would result in an offset
below the start which is invalid and throws an exception if passed
downstream.

To avoid the problem, we short-circuit with a "offset not found" response
straight away if that's the case.

redpanda-data@8f2de96
(cherry picked from commit 1a080ee)
Forgot to re-enable after fixing a bunch of timequery bugs.

(cherry picked from commit e7c0ddd)
@vbotbuildovich vbotbuildovich added this to the v24.1.x-next milestone Jun 21, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jun 21, 2024
@nvartolomei nvartolomei modified the milestones: v24.1.x-next, v24.1.9 Jun 21, 2024
@piyushredpanda piyushredpanda merged commit a2a37a6 into redpanda-data:v24.1.x Jun 22, 2024
16 of 19 checks passed
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.

3 participants