sandeep-katta edited a comment on issue #23697: [SPARK-26758][core]Idle 
Executors are not getting killed after 
spark.dynamiAllocation.executorIdleTimeout value
URL: https://github.com/apache/spark/pull/23697#issuecomment-459021616
 
 
   > Just to confirm, they won't be removed at 60s but will be removed at 120s, 
but of course we expect them to be removed at 60s, right?
   > 
   > Yeah that was kind of my point, can we just set initializing = true 
somewhere else to fix this? That's not hard either, but I kind of think this 
change is an OK way to do it for other reasons (i.e. I don't quite get why 
you'd remove idle executors right _after_ checking if the number of executors 
is right).
   
   
   No they wont be removed at 120s also, `removeTimes` is the one which holds 
the executors Id with timestamp, at 60s all the executors are expired and it is 
cleared from  `removeTimes` map.So at 120s this Map is empty,so executors will 
not be removed
   
   May be if you look at the driver logs below you can get the point why I am 
checking target executors before removing idle executors 
   
   2019-01-30 14:16:39,134 | INFO | spark-dynamic-executor-allocation | Request 
to remove **executorIds: 2, 1** | 
org.apache.spark.internal.Logging$class.logInfo(Logging.scala:54)
   2019-01-30 14:16:39,135 | DEBUG | spark-dynamic-executor-allocation | **Not 
removing idle executor 2 because there are only 3 executor(s) left (number of 
executor target 3)** | 
org.apache.spark.internal.Logging$class.logDebug(Logging.scala:58)
   
   Since `initializing` flag was still true  `updateAndSyncNumExecutorsTarget` 
is not resetting the numExecutorsTarget to the actual executors needed
   
   
   **Or I can do 1 more fix.**
   
   call `scheduleTask` with some delay like below
   executor.scheduleWithFixedDelay(scheduleTask, intervalMillis, 
intervalMillis, TimeUnit.MILLISECONDS)
   
   So the 1st call to `schedule` comes at 60s, then set `initializing` to false 
at the start of this function,then this problem will be solved

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]

Reply via email to