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 2019/10/08 18:58:02 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #26058: [SPARK-10614][core] Add monotonic time to Clock interface.

MaxGekk commented on a change in pull request #26058: [SPARK-10614][core] Add monotonic time to Clock interface.
URL: https://github.com/apache/spark/pull/26058#discussion_r332679129
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala
 ##########
 @@ -288,7 +288,7 @@ private[spark] class ExecutorAllocationManager(
     }
 
     // Update executor target number only after initializing flag is unset
-    updateAndSyncNumExecutorsTarget(clock.getTimeMillis())
+    updateAndSyncNumExecutorsTarget(clock.nanoTime())
 
 Review comment:
   System.nanoTime() is not monotonic across CPU cores. Are you sure that this value of `clock.nanoTime()` is not compared to `System.nanoTime()` from another thread? For instance, from `onSchedulerBacklogged()`.

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


With regards,
Apache Git Services

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