rickyma commented on code in PR #1411:
URL:
https://github.com/apache/incubator-uniffle/pull/1411#discussion_r1444471894
##########
common/src/main/java/org/apache/uniffle/common/util/RetryUtils.java:
##########
@@ -76,10 +76,15 @@ 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) {
+ if (previousThrowable != null &&
!previousThrowable.getClass().equals(t.getClass())) {
Review Comment:
I have simplified the code to make it more understandable. When the
exception thrown by the previous retry execution is not consistent with the
current one, the stack trace of the previous exception will be printed out to
prevent the loss of exception information.
Currently, I have encountered the problem of losing the original exception
information when multiple retries have inconsistent exceptions. The log summary
is as follows:
[17:19:14:635] [pool-3-thread-1] INFO RetryUtils.retryWithCondition - Retry
due to Throwable, java.lang.UnsatisfiedLinkError failed to load the required
native library
[17:19:14:635] [pool-3-thread-1] INFO RetryUtils.retryWithCondition -
Waiting 65000 milliseconds before next connection attempt.
[17:20:19:796] [pool-3-thread-1] INFO RetryUtils.retryWithCondition - Retry
due to Throwable, java.lang.NoClassDefFoundError Could not initialize class
org.apache.uniffle.io.netty.channel.epoll.EpollEventLoop
[17:20:19:796] [pool-3-thread-1] INFO RetryUtils.retryWithCondition -
Waiting 65000 milliseconds before next connection attempt.
PTAL. @zuston
--
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]