You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "s0nskar (via GitHub)" <gi...@apache.org> on 2025/06/06 08:19:20 UTC
[PR] [CELEBORN-2015][FOLLOWUP] Retry IOException failures for RPC requests [celeborn]
s0nskar opened a new pull request, #3315:
URL: https://github.com/apache/celeborn/pull/3315
<!--
Thanks for sending a pull request! Here are some tips for you:
- Make sure the PR title start w/ a JIRA ticket, e.g. '[CELEBORN-XXXX] Your PR title ...'.
- Be sure to keep the PR description updated to reflect all changes.
- Please write your PR title to summarize what this PR proposes.
- If possible, provide a concise example to reproduce the issue for a faster review.
-->
### What changes were proposed in this pull request?
Follow up PR for https://github.com/apache/celeborn/pull/3286 – Handling IOException wrapped inside CelebornException.
### Why are the changes needed?
`org.apache.celeborn.common.util.ThreadUtils#awaitResult` wraps non-timeout exception into CelebornException because of which it is not getting caught and retries are not working.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
NA
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2015][FOLLOWUP] Retry IOException failures for RPC requests [celeborn]
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on code in PR #3315:
URL: https://github.com/apache/celeborn/pull/3315#discussion_r2134101126
##########
common/src/main/scala/org/apache/celeborn/common/util/Utils.scala:
##########
@@ -1282,24 +1282,30 @@ object Utils extends Logging {
def withRetryOnTimeoutOrIOException[T](numRetries: Int, retryWait: Long)(block: => T): T = {
var retriesLeft = numRetries
+
+ def waitOrThrow(e: Throwable): Unit = {
+ if (retriesLeft > 0) {
+ val retryWaitMs = new Random().nextInt(retryWait.toInt)
+ try {
+ TimeUnit.MILLISECONDS.sleep(retryWaitMs)
+ } catch {
+ case _: InterruptedException =>
+ throw e
+ }
+ } else {
+ throw e
+ }
+ }
+
while (retriesLeft >= 0) {
retriesLeft -= 1
try {
return block
} catch {
+ case e: CelebornIOException if e.getCause != null && e.isInstanceOf[IOException] =>
Review Comment:
https://github.com/apache/celeborn/blob/60fa6d0ee786248b9f69c5c937f727884a4a3768/common/src/main/scala/org/apache/celeborn/common/exception/CelebornIOException.scala#L24-L25
CelebornIOException is class of IOException and should be handled below.
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2015][FOLLOWUP] Retry IOException failures for RPC requests [celeborn]
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on code in PR #3315:
URL: https://github.com/apache/celeborn/pull/3315#discussion_r2134101365
##########
common/src/main/scala/org/apache/celeborn/common/util/Utils.scala:
##########
@@ -1282,24 +1282,30 @@ object Utils extends Logging {
def withRetryOnTimeoutOrIOException[T](numRetries: Int, retryWait: Long)(block: => T): T = {
var retriesLeft = numRetries
+
+ def waitOrThrow(e: Throwable): Unit = {
+ if (retriesLeft > 0) {
+ val retryWaitMs = new Random().nextInt(retryWait.toInt)
+ try {
+ TimeUnit.MILLISECONDS.sleep(retryWaitMs)
+ } catch {
+ case _: InterruptedException =>
+ throw e
+ }
+ } else {
+ throw e
+ }
+ }
+
while (retriesLeft >= 0) {
retriesLeft -= 1
try {
return block
} catch {
+ case e: CelebornIOException if e.getCause != null && e.isInstanceOf[IOException] =>
Review Comment:
You shall mean CelebornException.
It is better that you can provide a exception example in the PR description.
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2015][FOLLOWUP] Retry IOException failures for RPC requests [celeborn]
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on code in PR #3315:
URL: https://github.com/apache/celeborn/pull/3315#discussion_r2134101365
##########
common/src/main/scala/org/apache/celeborn/common/util/Utils.scala:
##########
@@ -1282,24 +1282,30 @@ object Utils extends Logging {
def withRetryOnTimeoutOrIOException[T](numRetries: Int, retryWait: Long)(block: => T): T = {
var retriesLeft = numRetries
+
+ def waitOrThrow(e: Throwable): Unit = {
+ if (retriesLeft > 0) {
+ val retryWaitMs = new Random().nextInt(retryWait.toInt)
+ try {
+ TimeUnit.MILLISECONDS.sleep(retryWaitMs)
+ } catch {
+ case _: InterruptedException =>
+ throw e
+ }
+ } else {
+ throw e
+ }
+ }
+
while (retriesLeft >= 0) {
retriesLeft -= 1
try {
return block
} catch {
+ case e: CelebornIOException if e.getCause != null && e.isInstanceOf[IOException] =>
Review Comment:
You may mean CelebornException.
It is better that you can provide a exception example in the PR description.
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2015][FOLLOWUP] Retry IOException failures for RPC requests [celeborn]
Posted by "s0nskar (via GitHub)" <gi...@apache.org>.
s0nskar commented on code in PR #3315:
URL: https://github.com/apache/celeborn/pull/3315#discussion_r2135123433
##########
common/src/main/scala/org/apache/celeborn/common/util/Utils.scala:
##########
@@ -1282,24 +1282,30 @@ object Utils extends Logging {
def withRetryOnTimeoutOrIOException[T](numRetries: Int, retryWait: Long)(block: => T): T = {
var retriesLeft = numRetries
+
+ def waitOrThrow(e: Throwable): Unit = {
+ if (retriesLeft > 0) {
+ val retryWaitMs = new Random().nextInt(retryWait.toInt)
+ try {
+ TimeUnit.MILLISECONDS.sleep(retryWaitMs)
+ } catch {
+ case _: InterruptedException =>
+ throw e
+ }
+ } else {
+ throw e
+ }
+ }
+
while (retriesLeft >= 0) {
retriesLeft -= 1
try {
return block
} catch {
+ case e: CelebornIOException if e.getCause != null && e.isInstanceOf[IOException] =>
Review Comment:
done
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2015][FOLLOWUP] Retry IOException failures for RPC requests [celeborn]
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on PR #3315:
URL: https://github.com/apache/celeborn/pull/3315#issuecomment-2956653946
Thanks, merging to main and branch-0.6(0.6.0)
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2015][FOLLOWUP] Retry IOException failures for RPC requests [celeborn]
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei closed pull request #3315: [CELEBORN-2015][FOLLOWUP] Retry IOException failures for RPC requests
URL: https://github.com/apache/celeborn/pull/3315
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org