You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Nikita-Shupletsov (via GitHub)" <gi...@apache.org> on 2026/07/31 22:50:45 UTC
[PR] KAFKA-20878: Fixed task closing during task manager shutdown if the state updater thread is dead. [kafka]
Nikita-Shupletsov opened a new pull request, #23010:
URL: https://github.com/apache/kafka/pull/23010
* Removed the removedTasks field From DefaultStateUpdater as it's not used anywhere.
* Added drainQueuedTasks method to StateUpdater to be able to drain tasks from various queues without wrapping them into ReadOnlyTask.
* Added an integration test that reproduces and illustrates the issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-20878: Follow up code improvements [kafka]
Posted by "mjsax (via GitHub)" <gi...@apache.org>.
mjsax merged PR #23010:
URL: https://github.com/apache/kafka/pull/23010
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-20878: Fixed task closing during task manager shutdown if the state updater thread is dead. [kafka]
Posted by "mjsax (via GitHub)" <gi...@apache.org>.
mjsax commented on PR #23010:
URL: https://github.com/apache/kafka/pull/23010#issuecomment-5272212264
Claude has a few test suggestions:
```
Test hygiene
shouldFailTaskAddedWhileStateUpdaterThreadIsStopping leaves releaseStoppingThread un-counted-down if any assertion between the two latches fails. The state updater thread then stays parked in the mocked clear(), so shutdownThread burns its 1-minute join and @AfterEach's stateUpdater.shutdown(Duration.ofMinutes(1)) burns another and throws StreamsException — masking the real assertion failure and costing ~2 minutes. A try { … } finally { releaseStoppingThread.countDown(); } fixes it.
Leftover nits from last round, still open
- StateUpdater#tasks()'s javadoc lists the methods that remove tasks from the updater; drainQueuedTasks() isn't in the list.
- The new javadoc still doesn't say this is shutdown-only. That matters a bit more now: #23093 added fatalException() and maybeThrowFatalExceptionFromStateUpdater(), so a stray call while the updater is running would swallow failed tasks that handleExceptionsFromStateUpdater needs to surface.
- result.addAll(drainExceptionsAndFailedTasks().stream().map(...).collect(toList())) → drainExceptionsAndFailedTasks().forEach(e -> result.add(e.task())).
- TaskManager.java:1542-1543 — // And if there is anything left unhandled due to timeouts, handling now too reads as a fragment continuing the line above; and "due to timeouts" is now stale wording since #23093 removed the timeout.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-20878: Fixed task closing during task manager shutdown if the state updater thread is dead. [kafka]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23010:
URL: https://github.com/apache/kafka/pull/23010#issuecomment-5224311074
A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the `triage` label
should be removed to prevent this automation from happening again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-20878: Follow up code improvements [kafka]
Posted by "mjsax (via GitHub)" <gi...@apache.org>.
mjsax commented on PR #23010:
URL: https://github.com/apache/kafka/pull/23010#issuecomment-5289923202
Thanks for the PR. Merged to `trunk`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org