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

[v23.2.x] k/group: recover leader epoch on leader change #17397

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #17260

VerifiableConsumer is KIP-320 compliant now. At least to the degree the
java kafka client is.

This will facilitates testing of the redpanda implementation of KIP-320
in group recovery (redpanda-data#17260)
and data loss handling when write caching is enabled.

(cherry picked from commit 9316309)
This tests consumer group commits. The test also shows a bug in which
leader_offset is reset after cluster restart. This is fixed in a
subsequent commit.

(cherry picked from commit e1a3e65)
This was discovered while testing write caching feature. After
leadership change or node restart we would reply with default field
value `-2147483648` which breaks the KIP-320 logic.

`check_leader_epoch` in redpanda treats negative epoch values as "not
set" and, I believe, franz-go behaves the same.

As result, KIP-320 fencing is not being applied and the client ends up
with `OFFSET_OUT_OF_RANGE` error.

(cherry picked from commit 501b9d3)
@vbotbuildovich vbotbuildovich added this to the v23.2.x-next milestone Mar 26, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Mar 26, 2024
@piyushredpanda piyushredpanda merged commit 8b8d9ac into redpanda-data:v23.2.x Mar 26, 2024
23 checks passed
@piyushredpanda piyushredpanda modified the milestones: v23.2.x-next, v23.2.28 Apr 16, 2024
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