[SPARK-56952][CORE] Preserve heartbeat timeout executor loss reason#55994
Open
sunchao wants to merge 2 commits into
Open
[SPARK-56952][CORE] Preserve heartbeat timeout executor loss reason#55994sunchao wants to merge 2 commits into
sunchao wants to merge 2 commits into
Conversation
(cherry picked from commit 81dae0f3fdedb15c232adc34ccdd7bbd468d18d2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR preserves the original loss reason when Spark replaces an executor after a heartbeat timeout.
Current flow:
HeartbeatReceiverdetects that an executor has stopped heartbeating.ExecutorProcessLost("Executor heartbeat timed out ...").ExecutorKilled.Step 4 drops the more useful heartbeat-timeout diagnosis.
This PR keeps that timeout reason through the replacement flow, with two safeguards:
ExecutorKilled,ExecutorExited.It also clears the pending preserved reason if the kill request is rejected or fails.
Why are the changes needed?
Spark already knows that the executor was replaced because of a heartbeat timeout, but that information can be lost before the scheduler records the final executor loss reason.
Keeping the original reason makes executor-loss reporting more accurate and avoids collapsing a timeout-driven replacement into an ordinary generic kill.
This fixes SPARK-56952.
Does this PR introduce any user-facing change?
Yes.
Executor loss reporting is more specific for heartbeat-timeout removals. Cases that previously appeared as generic
ExecutorKilledcan now retain:ExecutorProcessLost("Executor heartbeat timed out ...")If the backend provides a concrete loss reason, Spark still keeps that backend reason instead.
How was this patch tested?
Unit tests cover:
ExecutorKilled,The OSS port itself has not been run through a local full test command yet.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Codex