You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "lucasbru (via GitHub)" <gi...@apache.org> on 2023/09/27 09:58:40 UTC

[GitHub] [kafka] lucasbru commented on a diff in pull request #14442: KAFKA-10199: Do not unlock state directories of tasks in state updater

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


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



##########
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:
   We probably want to do this outside of the loop.



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