FrankYang0529 commented on code in PR #19507:
URL: https://github.com/apache/kafka/pull/19507#discussion_r2049948975


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java:
##########
@@ -553,7 +553,7 @@ private void handleTasksWithStateUpdater(final Map<TaskId, 
Set<TopicPartition>>
     private void handleTasksPendingInitialization() {
         // All tasks pending initialization are not part of the usual 
bookkeeping
         for (final Task task : tasks.drainPendingTasksToInit()) {
-            closeTaskClean(task, Collections.emptySet(), 
Collections.emptyMap());
+            closeTaskClean(task, new HashSet<>(), new HashMap<>());

Review Comment:
   The leak resource was found by https://github.com/apache/kafka/pull/14783. 
On that branch, the leak resource only happened for the case 
`EosIntegrationTest#shouldCheckpointRestoredOffsetsWhenClosingCleanDuringRestoringStateUpdaterEnabled(eosConfig=StreamsConfig.EXACTLY_ONCE,
 processingThreadsEnabled="false")`. I think it's safe to revert the change 
cause of:
   
   1. The EOSv1 was removed in 4.0. 
   2. ClusterTestExtension also has [thread leak 
detection](https://github.com/apache/kafka/blob/810beef50e189cc9d1a0839961dffd14930ffe2e/test-common/test-common-runtime/src/main/java/org/apache/kafka/common/test/junit/ClusterTestExtensions.java#L164-L175).
 Revert the change of #16730 on the trunk branch, the test case still can pass.



-- 
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-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to