mjsax commented on code in PR #18732: URL: https://github.com/apache/kafka/pull/18732#discussion_r1934423933
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/StateDirectory.java: ########## @@ -295,6 +294,9 @@ private void closeStartupTasks(final Predicate<Task> predicate) { // now that we have exclusive ownership of the drained tasks, close them for (final Task task : drainedTasks) { + // main thread locked the task initially on startup, but has moved on and will not unlock + // so we need to explicitly swap lock ownership here as this method is called by a StreamThread + lockedTasksToOwner.replace(task.id(), Thread.currentThread()); Review Comment: Thanks @nicktelford! -- 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