waitinfuture commented on code in PR #979:
URL:
https://github.com/apache/incubator-celeborn/pull/979#discussion_r1029373501
##########
client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala:
##########
@@ -1605,21 +1605,29 @@ class LifecycleManager(appId: String, val conf:
CelebornConf) extends RpcEndpoin
}
}
- private def requestCommitFiles(
+ private def requestCommitFilesWithRetry(
endpoint: RpcEndpointRef,
message: CommitFiles): CommitFilesResponse = {
- try {
- endpoint.askSync[CommitFilesResponse](message)
- } catch {
- case e: Exception =>
- logError(s"AskSync CommitFiles for ${message.shuffleId} failed.", e)
- CommitFilesResponse(
- StatusCode.FAILED,
- List.empty.asJava,
- List.empty.asJava,
- message.masterIds,
- message.slaveIds)
+ val maxRetries = conf.requestCommitFilesMaxRetries
+ var retryTimes = 0
+ while (retryTimes < maxRetries) {
+ try {
+ return endpoint.askSync[CommitFilesResponse](message)
+ } catch {
+ case e: Exception =>
+ retryTimes += 1
Review Comment:
1. I think we should retry regardless the Exception type.
2. For immediate Exceptions it's useful, but for TimeoutException it's
unnecessary.
--
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]