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

Backport of #12063 v23.1.x #12086

Merged

Conversation

graphcareful
Copy link
Contributor

Backport of PR #12063

@graphcareful graphcareful changed the title Backport pr 12063 v21.1.x Backport of #12063 v21.1.x Jul 13, 2023
- If the user attempts to make a offset_for_leader_epoch request where
the requested epoch is ahead of the latest known, the response should
contain -1s for requested epoch and end_offset.

- Fixes: redpanda-data#11864

(cherry picked from commit d7184ee)
- offset_for_leader_epoch requests were unconditionally returning the
current leader epoch.

- The correct behavior is to return the requested epoch, as seen here:
https://github.com/apache/kafka/blob/3.5.0/storage/src/main/java/org/apache/kafka/storage/internals/epoch/LeaderEpochFileCache.java#L276-L282

- Fixes: redpanda-data#11864

(cherry picked from commit fe5ad6c)
- Ensure that the returned epoch end offset is -1 for requested epoch's
that are in the future.

- Ensure that the returned leader epoch is not the current epoch but
actually the requested epoch.

(cherry picked from commit 1d5d6de)
@graphcareful graphcareful changed the title Backport of #12063 v21.1.x Backport of #12063 v23.1.x Jul 14, 2023
@BenPope BenPope added this to the v23.1.x-next milestone Jul 17, 2023
@graphcareful graphcareful merged commit c6686d7 into redpanda-data:v23.1.x Jul 17, 2023
22 checks passed
@BenPope BenPope modified the milestones: v23.1.x-next, v23.1.14 Jul 27, 2023
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.

None yet

3 participants