Skip to content

KAFKA-19456: State and leader epoch should not be updated on writes. #20079

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

Merged
merged 2 commits into from
Jul 1, 2025

Conversation

smjn
Copy link
Collaborator

@smjn smjn commented Jul 1, 2025

  • If a write request with higher state than seen so far for a
    specific share partition arrives at the share coordinator, the code will
    create a new share snapshot and also update the internal view of the
    state epoch.
  • For writes with higher leader epoch, the current records are updated
    with that value as well.
  • The above is not the expected behavior and only initialize RPCs should
    set and alter the state epoch and read RPC should set the leader epoch.
  • This PR rectifies the behavior.
  • Few tests have been removed.

Reviewers: Andrew Schofield aschofield@confluent.io

@smjn smjn marked this pull request as ready for review July 1, 2025 09:55
@smjn smjn requested a review from AndrewJSchofield July 1, 2025 09:55
@github-actions github-actions bot added KIP-932 Queues for Kafka triage PRs from the community labels Jul 1, 2025
@smjn smjn added ci-approved small Small PRs and removed triage PRs from the community labels Jul 1, 2025
@smjn smjn changed the title KAFKA-19456: State epoch should not be updated on writes. Jul 1, 2025
@smjn smjn marked this pull request as draft July 1, 2025 12:27
@github-actions github-actions bot removed the small Small PRs label Jul 1, 2025
@smjn smjn marked this pull request as ready for review July 1, 2025 15:34
Copy link
Member

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

@AndrewJSchofield AndrewJSchofield merged commit 05b2601 into apache:trunk Jul 1, 2025
26 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved KIP-932 Queues for Kafka
2 participants