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



##########
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:
       I guess this is ok for its current usage as really its just trying to 
keep it from firing at all. If someone really wanted to use the value then it 
seems like this could just cause tests to take longer.
   
   perhaps we should just change this config to disabled the timer altogether?




----------------------------------------------------------------
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]

Reply via email to