AngersZhuuuu commented on a change in pull request #30131:
URL: https://github.com/apache/spark/pull/30131#discussion_r510075555
##########
File path:
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
##########
@@ -134,7 +134,7 @@ class CoarseGrainedSchedulerBackend(scheduler:
TaskSchedulerImpl, val rpcEnv: Rp
// Periodically revive offers to allow delay scheduling to work
val reviveIntervalMs =
conf.get(SCHEDULER_REVIVE_INTERVAL).getOrElse(1000L)
- reviveThread.scheduleAtFixedRate(() => Utils.tryLogNonFatalError {
+ reviveThread.scheduleWithFixedDelay(() => Utils.tryLogNonFatalError {
Option(self).foreach(_.send(ReviveOffers))
Review comment:
> I think it's meaningless to replace for this kind of task whose
intentional action happens asynchronically. For example, in this case, sending
the message `ReviveOffers` should finish quickly but the intentional action
`reviveOffers` may take a longer time. I guess the _delay_ here you want to
deal with is from the former one rather than the latter.
If there is a delay in Sender side, avoid send `ReviveOffers` twice, then
receive side don't need to call `makeOffers` twice in repeatedly.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]