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

KAFKA-18618: Improve leader change handling of acknowledgements #18672

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

AndrewJSchofield
Copy link
Member

There is a problem in the share consumer where records fetched from node A might be acknowledged with node B, if node B used to be the leader of the topic-partition and A becomes unavailable.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@AndrewJSchofield AndrewJSchofield marked this pull request as draft January 22, 2025 17:50
@AndrewJSchofield AndrewJSchofield added the KIP-932 Queues for Kafka label Jan 22, 2025
@clolov
Copy link
Contributor

clolov commented Jan 23, 2025

I know this is still marked as a Draft, but how difficult will it be to add a test which tests the edge case which uncovered this? I believe I can follow the reasoning otherwise i.e. you only want to send the acknowledgements to the nodes from which the in-flight records originated.

@AndrewJSchofield
Copy link
Member Author

I know this is still marked as a Draft, but how difficult will it be to add a test which tests the edge case which uncovered this? I believe I can follow the reasoning otherwise i.e. you only want to send the acknowledgements to the nodes from which the in-flight records originated.

Not that difficult. Might be a follow-on PR to complete the testing, but we have two pieces of work in progress. First, we are developing tests using MockClient which can pretend to be a cluster of multiple brokers in which we can very deliberately introduce specific changes of leadership to exercise all of the code paths. Then, we are starting to run system tests which roll the cluster while performing a long-running workload. It was a rolling restart system test that showed the problem initially.

@clolov
Copy link
Contributor

clolov commented Jan 23, 2025

Awesome! Looking forward to seeing those 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants