[GitHub] [spark] seayoun commented on a change in pull request #26938: [SPARK-30297][CORE] Fix executor lost in net cause app hung upp

2019-12-21 Thread GitBox
seayoun 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_r360640643
 
 

 ##
 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:
   We add the executor before rescheduler can avoid the tasks to rescheduler 
the bad executors


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:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] seayoun commented on a change in pull request #26938: [SPARK-30297][CORE] Fix executor lost in net cause app hung upp

2019-12-20 Thread GitBox
seayoun 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_r360625700
 
 

 ##
 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:
   > `sc.killAndReplaceExecutor` already try to mark it as "pending to remove" 
this is right, but the task has rescheduled at this executor agait at this 
time, the executor must be removed from the ExecutorBackend to avoid. 
   For example, it will `disableExecutor` in `CoarseGrainedSchedulerBackend` if 
the driver lost connection from executor, `disableExecutor` mark the executor 
dead, and then to reschedule the task on the lost connection executors.


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:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] seayoun commented on a change in pull request #26938: [SPARK-30297][CORE] Fix executor lost in net cause app hung upp

2019-12-20 Thread GitBox
seayoun 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_r360625775
 
 

 ##
 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:
   The task can reschedule at this executor before mark it as "pending to 
remove".


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:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] seayoun commented on a change in pull request #26938: [SPARK-30297][CORE] Fix executor lost in net cause app hung upp

2019-12-20 Thread GitBox
seayoun 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_r360625700
 
 

 ##
 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:
   > `sc.killAndReplaceExecutor` already try to mark it as "pending to remove" 
this is right, but the task has rescheduled at this executor agait at this 
time, the executor must be removed from the ExecutorBackend to avoid, for 
example, it will `disableExecutor` in `CoarseGrainedSchedulerBackend` if the 
driver lost connection from executor.


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:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org