[ISSUE-329] Should not sleep if reserve slots successfully in reserveSlotsWithRetry (#330)
This commit is contained in:
parent
46cbe4fb04
commit
d166e042be
@ -956,6 +956,9 @@ class LifecycleManager(appId: String, val conf: RssConf) extends RpcEndpoint wit
|
||||
var noAvailableSlots = false
|
||||
var success = false
|
||||
while (retryTimes <= maxRetryTimes && !success && !noAvailableSlots) {
|
||||
if (retryTimes > 1) {
|
||||
Thread.sleep(retryWaitInterval)
|
||||
}
|
||||
// reserve buffers
|
||||
logInfo(s"Try reserve slots for ${Utils.makeShuffleKey(applicationId, shuffleId)} " +
|
||||
s"for $retryTimes times.")
|
||||
@ -999,7 +1002,6 @@ class LifecycleManager(appId: String, val conf: RssConf) extends RpcEndpoint wit
|
||||
}
|
||||
}
|
||||
retryTimes += 1
|
||||
Thread.sleep(retryWaitInterval)
|
||||
}
|
||||
// if failed after retry, destroy all allocated buffers
|
||||
if (!success) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user