cadonna commented on code in PR #14442:
URL: https://github.com/apache/kafka/pull/14442#discussion_r1338448490


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java:
##########
@@ -1226,7 +1226,9 @@ private void releaseLockedUnassignedTaskDirectories() {
         final Iterator<TaskId> taskIdIterator = 
lockedTaskDirectories.iterator();
         while (taskIdIterator.hasNext()) {
             final TaskId id = taskIdIterator.next();
-            if (!tasks.contains(id)) {
+            final Set<TaskId> tasksInStateUpdater = stateUpdater != null

Review Comment:
   > Also could we just store a copy of allTasks() and use containsKey?
   
   `allTasks()` returns the tasks owned by the stream thread. Those do not 
include tasks owned by the state updater. Indeed, `tasks.contains()` looks up 
the tasks in the same data structures that `allTasks()` uses. So, using 
`allTasks()` would not fix the bug.



-- 
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