SPARK-34519 ExecutorPodsAllocator applies exponential backoff delays … #53600
+836
−28
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.
…for executor pod requests when pods repeatedly fail to start
What changes were proposed in this pull request?
Introduces exponential backoff delays for executor pod requests when pods repeatedly fail to start. It tracks the following startup failures:
PodFailedstatus before the executor registers with the driver (indicating the executor never successfully started)Operates as a state machine with two states:
When backoff is enabled, two new metrics added. Will update
monitoring.mddoc with new source if patch looks good.Why are the changes needed?
When executor pods repeatedly fail to start due to Kubernetes infrastructure issues (control plane overload, resource exhaustion, service mesh issues), the current implementation continues requesting pods at full speed, amplifying load on already stressed infrastructure.
Relationship to ExecutorFailureTracker:
This backoff mechanism is complementary to the existing
ExecutorFailureTracker. WhileExecutorFailureTrackercounts all Pod failures (including those that started successfully but failed during task execution) to determine when to abort the application (spark.executor.maxNumFailures), the backoff controller specifically tracks startup failures only to throttle allocation requests and protect infrastructure.Does this PR introduce any user-facing change?
When enabled: executor pod allocation is throttled with exponential delays when startup failures exceed the threshold.
Observability changes when enabled:
How was this patch tested?
kubectl create quota test --hard=cpu=1,memory=1GWas this patch authored or co-authored using generative AI tooling?
Cursor 2.2.9