peter-toth commented on code in PR #52899:
URL: https://github.com/apache/spark/pull/52899#discussion_r2497743993
##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsLifecycleManager.scala:
##########
@@ -113,25 +113,23 @@ private[spark] class ExecutorPodsLifecycleManager(
inactivatedPods -= execId
case deleted@PodDeleted(_) =>
+ execIdsRemovedInThisRound += execId
if (removeExecutorFromSpark(schedulerBackend, deleted, execId)) {
- execIdsRemovedInThisRound += execId
logDebug(s"Snapshot reported deleted executor with id $execId," +
s" pod name ${state.pod.getMetadata.getName}")
}
inactivatedPods -= execId
case failed@PodFailed(_) =>
- val deleteFromK8s = !execIdsRemovedInThisRound.contains(execId)
+ val deleteFromK8s = execIdsRemovedInThisRound.add(execId)
Review Comment:
Yes it will be `false` when `execIdsRemovedInThisRound` already has
`execId`, but I think that's what we want. Only the first addition of `execId`
returns with `true`, so only once we try to delete the pod per
`onNewSnapshots()` invocation.
--
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]