yangwwei opened a new pull request #34319:
URL: https://github.com/apache/spark/pull/34319


   SPARK-33099 added the support to respect 
`spark.dynamicAllocation.executorIdleTimeout` in `ExecutorPodsAllocator`. 
However, when it checks if a pending executor pod is timed out, it checks 
against the pod's "startTime", see code 
[here](https://github.com/apache/spark/blob/c2ba498ff678ddda034cedf45cc17fbeefe922fd/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsAllocator.scala#L459).
 A pending pod "startTime" is empty, and this causes the function 
"isExecutorIdleTimedOut()" always return true for pending pods.
   
   
   ### What changes were proposed in this pull request?
   Change the check from using pod's `startTime` to `creationTime`. 
CreationTime is the timestamp when a pod gets created on K8s, `startTime` is 
the timestamp when pod gets started, a pending pod's startTime is empty. 
   
   
   ### Why are the changes needed?
   This fixed the issue that `spark.dynamicAllocation.executorIdleTimeout` 
currently is not honored by pending executor pods.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   The PR includes the UT changes, that has the testing coverage for this issue.
   


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

To unsubscribe, e-mail: [email protected]

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