dajac commented on code in PR #15142:
URL: https://github.com/apache/kafka/pull/15142#discussion_r1446089431


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/runtime/CoordinatorRuntime.java:
##########
@@ -1466,17 +1477,25 @@ public <T> CompletableFuture<T> 
scheduleTransactionalWriteOperation(
     ) {
         throwIfNotRunning();
         log.debug("Scheduled execution of transactional write operation {}.", 
name);
-        CoordinatorWriteEvent<T> event = new CoordinatorWriteEvent<>(
-            name,
+        return partitionWriter.maybeStartTransactionVerification(
             tp,
             transactionalId,
             producerId,
-            producerEpoch,
-            timeout,
-            op
-        );
-        enqueue(event);
-        return event.future;
+            producerEpoch
+        ).thenCompose(verificationGuard -> {

Review Comment:
   yeah, i am also happy with this. it is simple and elegant.



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