artemlivshits commented on code in PR #14705:
URL: https://github.com/apache/kafka/pull/14705#discussion_r1395062167


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/runtime/CoordinatorRuntime.java:
##########
@@ -659,9 +660,21 @@ public TopicPartition key() {
          */
         @Override
         public void run() {
+            try {
+                runAsync().get();

Review Comment:
   The locking model is not changed -- it holds the lock around the whole call, 
see line 1241
   
    `result = asyncFunc.apply(context).whenComplete((none, t) -> 
context.lock.unlock());`
   
   the .whenComplete callback will execute after the function is complete, so 
lock is held around the whole thing.
   
   The unlock in the `finally` clause is so that if we asyncFunc.apply throws 
an exception (which would happen if the function in fact is executed 
synchronously) and we didn't get the future, then we unlock inline.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to