Skip to content

Conversation

@AngersZhuuuu
Copy link
Contributor

What changes were proposed in this pull request?

Call kill executor

image

executor 18 failed to be killed

image

causing TaskSchedulerImpl can't mark TaskSet as UnschedulableTaskSet then call a new container then causing task stuck

Why are the changes needed?

Avoiding task stuck

Does this PR introduce any user-facing change?

No

How was this patch tested?

MT

Was this patch authored or co-authored using generative AI tooling?

NO

…o schedule an unschedulable task, it should exclude executors that are pending to remove
@github-actions github-actions bot added the CORE label Oct 30, 2025
// in turn is used to decide when we can attain data locality on a given host
protected val hostToExecutors = new HashMap[String, HashSet[String]]

protected val availableHostToExecutors = new HashMap[String, HashSet[String]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maintain this for quick check

// unschedulable tasks else we will abort immediately.
executorIdToRunningTaskIds.find(x => !isExecutorBusy(x._1)) match {
executorIdToRunningTaskIds.find(
x => isExecutorAvailable(x._1) && !isExecutorBusy(x._1)) match {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we just extend busy to include those we're planning on removing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IF we can directly use CoarseGrainedSchedulerBackend's executorPendingToRemove should be more better, but seems can't?

.filter { id => !executorsPendingToRemove.contains(id) }
.filter { id => force || !scheduler.isExecutorBusy(id) }
executorsToKill.foreach { id => executorsPendingToRemove(id) = !countFailures }
executorsToKill.foreach { id => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about decommissioned executors ?


if (!launchedAnyTask) {
taskSet.getCompletelyExcludedTaskIfAny(hostToExecutors).foreach { taskIndex =>
taskSet.getCompletelyExcludedTaskIfAny(availableHostToExecutors).foreach { taskIndex =>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

availableHostToExecutors or hostToAvailableExecutors


if (!launchedAnyTask) {
taskSet.getCompletelyExcludedTaskIfAny(hostToExecutors).foreach { taskIndex =>
taskSet.getCompletelyExcludedTaskIfAny(availableHostToExecutors).foreach { taskIndex =>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will be simpler to just have a hash set updated for killed executor and filter out from executorIdToHost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants