-
Notifications
You must be signed in to change notification settings - Fork 15.4k
KAFKA-12462: proceed with task revocation in case of thread in PENDING_SHUTDOWN #10311
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,7 +87,9 @@ public void onPartitionsRevoked(final Collection<TopicPartition> partitions) { | |
| taskManager.activeTaskIds(), | ||
| taskManager.standbyTaskIds()); | ||
|
|
||
| if (streamThread.setState(State.PARTITIONS_REVOKED) != null && !partitions.isEmpty()) { | ||
| // We need to still invoke handleRevocation if the thread has been told to shut down, but we shouldn't ever | ||
| // transition away from PENDING_SHUTDOWN once it's been initiated (to anything other than DEAD) | ||
| if ((streamThread.setState(State.PARTITIONS_REVOKED) != null || streamThread.state() == State.PENDING_SHUTDOWN) && !partitions.isEmpty()) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need to be concerned about the oder these execute?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is the correct order (assuming you mean the order of |
||
| final long start = time.milliseconds(); | ||
| try { | ||
| taskManager.handleRevocation(partitions); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.