[SPARK-55045][CORE][TESTS] Fix a flaky test in ExecutorSuite #53814
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #53814"
general
weight: 0.35
Ngone51
What changes were proposed in this pull request?
This PR fixes a flaky test
SPARK-33587: isFatalErrorinExecutorSuite.Recnetly, this test occasionally fails.
https://github.com/apache/spark/actions/runs/20850209017/job/59903273573#step:10:4885
This issue happens like as follows.
1. testThrowable is invoked with
InterruptedException2.
InterruptedExceptionis passed to errorInGuavaCache3. Cache#get is invoked. The actual class is LocalCache.LocalLoadingCache
4. The flow reaches this line and the interrupted status is set for the current Thread
5. Escaped from
errorInGuavaCache, and at the next round of the loop, errorInThreadPool is invoked6. Through f.get(), FutureTask#awaitDone is invoked.
7. If the future task is immediately done, the flow reaches this line, that issue doesn't occur otherwise the flow reaches this line because the interrupted status is set. Then,
InterruptedExceptionis thrown without the causes.8.
InterruptedExceptionis not a fatal error so iftestThrowableis invoked withisFatal = truethis issue occurs.This issue can be reproduced by changing
ExecutorSuite.scalalike as follows.To fix the issue, this PR clear the interrupted status after
cache.getinerrorInGuavaCache.Why are the changes needed?
For test stability.
Does this PR introduce _any_ user-facing change?
No.
How was this patch tested?
Confirmed the test passed even if
ExecutorSuite.scalais changed like mentioned above.Was this patch authored or co-authored using generative AI tooling?
No.