You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/16 15:11:13 UTC

[GitHub] [spark] Ngone51 commented on a change in pull request #29773: [SPARK-32287][CORE] Fix flaky o.a.s.ExecutorAllocationManagerSuite on GithubActions

Ngone51 commented on a change in pull request #29773:
URL: https://github.com/apache/spark/pull/29773#discussion_r489515161



##########
File path: core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala
##########
@@ -247,7 +247,13 @@ private[spark] class ExecutorAllocationManager(
         }
       }
     }
-    executor.scheduleWithFixedDelay(scheduleTask, 0, intervalMillis, TimeUnit.MILLISECONDS)
+
+    // SPARK-32287: Avoid the immediate schedule() after ExecutorAllocationManager started in test
+    // so that we won't hit the race condition between thread "spark-dynamic-executor-allocation"
+    // and thread "pool-1-thread-1-ScalaTest-running".
+    val initialDelay = if (testing) conf.get(TEST_SCHEDULE_INTERVAL) else 0

Review comment:
       Yeah, I actually also tried that way. I'd like to disable the whole timer if you also think it's ok.




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



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