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


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionalRequestResult.java:
##########
@@ -48,15 +50,19 @@ public void done() {
     }
 
     public void await() {
-        this.await(Long.MAX_VALUE, TimeUnit.MILLISECONDS);
+        this.await(Long.MAX_VALUE, TimeUnit.MILLISECONDS, () -> new 
KafkaException("Unknown reason."));

Review Comment:
   @Yunyung thanks for your suggestion. 🙇‍♂️ 
   
   However, I would like to keep my current code for this review.
   The purpose of KAFKA-17019 is to ensure that any `TimeoutException` thrown 
by `ProducerClient` always includes a `root cause`.
   
   To elaborate, the `root cause` may sometimes appear meaningless, such as 
`Unknown Error`. 
   However, by doing so, every call site that catches a `TimeoutException` can 
use the `root cause` without having to check whether it is `null` or not.
   
   What do you think?



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