Ngone51 commented on a change in pull request #26938: [SPARK-30297][CORE] Fix
executor lost in net cause app hung upp
URL: https://github.com/apache/spark/pull/26938#discussion_r360854474
##########
File path: core/src/main/scala/org/apache/spark/HeartbeatReceiver.scala
##########
@@ -199,6 +200,18 @@ private[spark] class HeartbeatReceiver(sc: SparkContext,
clock: Clock)
if (now - lastSeenMs > executorTimeoutMs) {
logWarning(s"Removing executor $executorId with no recent heartbeats:
" +
s"${now - lastSeenMs} ms exceeds timeout $executorTimeoutMs ms")
+ sc.schedulerBackend match {
+ case backend: CoarseGrainedSchedulerBackend =>
+ backend.synchronized {
+ // Mark executor pending to remove if executor heartbeat expired
+ // to avoid reschedule task on this executor again
+ if (!backend.executorsPendingToRemove.contains(executorId)) {
+ backend.executorsPendingToRemove(executorId) = false
Review comment:
Hi, @seayoun. After a second think, I think this fix can really avoid app
hang, though it can not clean up dead records in
`CoarseGrainedSchedulerBackend`.
As you may have realized that a same issue has been posted in SPARK-27348
and its author(@xuanyuanking) has assigned to me recently. And it's really
coincidental. And I really appreciate that you would like my proposal.
Actually, the main idea is still base on original author's contribution.
Also, thanks for review.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]