frankvicky commented on code in PR #20159:
URL: https://github.com/apache/kafka/pull/20159#discussion_r2202438506


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionalRequestResult.java:
##########
@@ -48,15 +49,24 @@ public void done() {
     }
 
     public void await() {
-        this.await(Long.MAX_VALUE, TimeUnit.MILLISECONDS);
+        this.await(Long.MAX_VALUE, TimeUnit.MILLISECONDS, null);
     }
 
     public void await(long timeout, TimeUnit unit) {
+        this.await(timeout, unit, null);
+    }
+
+    public void await(long timeout, TimeUnit unit, PotentialCauseException 
potentialCauseException) {

Review Comment:
   Could we change `PotentialCauseException` to 
`Supplier<PotentialCauseException>`?
   Creating an exception instance is very expensive; lazy creation could help 
us avoid this situation.
   



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