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


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/DefaultStateUpdater.java:
##########
@@ -115,6 +117,7 @@ public void run() {
 
         private void runOnce() throws InterruptedException {
             performActionsOnTasks();
+            initializeTasksIfNeeded();

Review Comment:
   I wanted to avoid keeping the `tasksAndActionsLock` for too long. Based on 
what you said initialization can take some time, so there is some potential for 
blocking the main thread here. This is more or less just defensive programming 
and I don't have a very concrete situation where this becomes a problem. One 
can imagine that if you get two rebalances in a row, the second rebalance will 
be blocked in `handleAssignment` if the initialization from the first rebalance 
is still blocking `tasksAndActionsLock`.



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