rickyma commented on code in PR #1411:
URL: 
https://github.com/apache/incubator-uniffle/pull/1411#discussion_r1443812378


##########
common/src/main/java/org/apache/uniffle/common/util/RetryUtils.java:
##########
@@ -76,19 +76,24 @@ public static <T> T retryWithCondition(
       Function<Throwable, Boolean> isRetryFunc)
       throws Throwable {
     int retry = 0;
+    Throwable previousThrowable = null;
     while (true) {
       try {
         return cmd.execute();
       } catch (Throwable t) {
         retry++;
         if (isRetryFunc.apply(t) && retry < retryTimes) {
+          previousThrowable = t;
           LOG.info("Retry due to Throwable, " + t.getClass().getName() + " " + 
t.getMessage());

Review Comment:
   Using only `t.getMessage()` will result in the loss of the complete 
exception stack trace, which will make it difficult to locate issues when they 
arise.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to