-
Notifications
You must be signed in to change notification settings - Fork 15k
KAFKA-16985: Ensure consumer attempts to send leave request on close even if interrupted #16686
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
lianetm
merged 58 commits into
apache:trunk
from
kirktrue:KAFKA-16985-clear-interrupt-on-consumer-close
Nov 13, 2024
Merged
Changes from all commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
7619441
KAFKA-16985: Ensure consumer sends leave request on close even if int…
kirktrue 6d19c30
More WiP
kirktrue f52a8b8
Fixed checkstyle errors :(
kirktrue e4b0a27
Merge branch 'trunk' into KAFKA-16985-clear-interrupt-on-consumer-close
kirktrue 6bd52ca
Attempting to use polling wait for member to join and then leave cons…
kirktrue 980e782
Updates to test core issue
kirktrue d113d98
Merge branch 'trunk' into KAFKA-16985-clear-interrupt-on-consumer-close
kirktrue abac405
Reverting method name change
kirktrue 30f85a6
Testing only the new consumer group protocol as the classic consumer …
kirktrue fd563ac
Reverting name changes
kirktrue ad3c7d9
Minor cleanup
kirktrue acc3cb4
Update AsyncKafkaConsumer.java
kirktrue 09ccd52
Update AsyncKafkaConsumer.java
kirktrue c3de041
Update AsyncKafkaConsumer.java
kirktrue a71b251
Attempting to generalize testCloseLeavesGroupOnInterrupt for use by b…
kirktrue 3effda7
Reverted to only run the integration test only for CONSUMER
kirktrue 0bc3908
Forcing the timer to 0 if the thread was interrupted
kirktrue fe5464b
Implement terrible, terrible workaround for 0 timeout for leaving the…
kirktrue 17c30c4
Remove horrible atrocity of the 'leave group timer'
kirktrue 9899647
Removed unnecessary import
kirktrue 23aed73
Added a parameterized test to exercise close behavior when interrupted
kirktrue 086038d
Separated tests to make their intent more obvious
kirktrue 17658c1
Merge branch 'trunk' into KAFKA-16985-clear-interrupt-on-consumer-close
kirktrue 484b3cf
Aligned the exception throwing to match the ClassicKafkaConsumer
kirktrue b2a5373
Restoring interrupt flag status for ConsumerRebalanceListener invocat…
kirktrue 144a0a9
Merge branch 'trunk' into KAFKA-16985-clear-interrupt-on-consumer-close
kirktrue 36a49fd
Fixed JavaDoc problem
kirktrue e091cd7
Merge branch 'trunk' into KAFKA-16985-clear-interrupt-on-consumer-close
kirktrue 0f13eff
Merge branch 'trunk' into KAFKA-16985-clear-interrupt-on-consumer-close
kirktrue 7e3a946
Merge branch 'trunk' into KAFKA-16985-clear-interrupt-on-consumer-close
kirktrue 82c024d
Revised comments
kirktrue e4d38dd
Removed unnecessary catch block
kirktrue cb63350
More updates for comments to change Javadoc style
kirktrue 3b8751e
Updating testCloseLeavesGroupOnInterrupt() integration test to run fo…
kirktrue 39db09c
Merge branch 'trunk' into KAFKA-16985-clear-interrupt-on-consumer-close
kirktrue 6614bd5
WIP on new approach to perform callback without hops
kirktrue df36f1d
WIP updates to unit tests for leaving group on close
kirktrue d5e71a7
Fixed silly mistake that would make this never, ever work
kirktrue 7305973
Updates to revert unnecessary changes
kirktrue ca04847
More tweaks to revert unnecessary diffs
kirktrue dda8650
Minor test method name tweaks
kirktrue ad4de03
Formatting, comments, refactoring, and restoring the interrupt flag i…
kirktrue a417e92
Removed efforts to restore interrupt state, post handler
kirktrue 59f128b
Merge branch 'trunk' into KAFKA-16985-clear-interrupt-on-consumer-close
kirktrue e8b6d99
Updates to snapshot the assignment in the background thread to use in…
kirktrue fa878fe
Updates to address PR feedback
kirktrue af8ef05
Merge branch 'trunk' into KAFKA-16985-clear-interrupt-on-consumer-close
kirktrue ac8c7d9
Reverting whitespace changes
kirktrue d635cee
Changed the visibility of notifyAssignmentChange since it is no longe…
kirktrue ca54979
Addressing the signal-on-close issue from a different approach
kirktrue 313ae6e
Updates to address feedback from PR review
kirktrue 271638b
Removed unnecessary import
kirktrue 4b0d310
Notifying when subscription is changed when the assignment is cleared
kirktrue 99d7bc1
Updated JavaDoc comments
kirktrue 91a0ec2
Notifying on clearAssignment only if using auto-assigned partitions (…
kirktrue f8d0e1d
Merge branch 'trunk' into KAFKA-16985-clear-interrupt-on-consumer-close
kirktrue 6dcd3a2
Removed superfluous call to notifyAssignmentChange() since clearAssig…
kirktrue e5d4044
Removed extraneous whitespace above close() method
kirktrue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are notifying on the path of new assignment and on leave, but I think we're missing the fenced/fatal paths.
Those 2 end up calling
clearAssignment, so maybe we could notify there to cover them? (right after ln 483 subscriptions.assignFromSubscribed(Collections.emptySet()))?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the code to look like this: