Skip to content

fix: [branch-54] see through Shared wrapper when classifying task IO errors (backport of #2119) - #2239

Merged
andygrove merged 1 commit into
apache:branch-54from
andygrove:fix/shared-error-classification-branch-54
Aug 6, 2026
Merged

fix: [branch-54] see through Shared wrapper when classifying task IO errors (backport of #2119)#2239
andygrove merged 1 commit into
apache:branch-54from
andygrove:fix/shared-error-classification-branch-54

Conversation

@andygrove

Copy link
Copy Markdown
Member

Which issue does this PR close?

Backport of #2119 to branch-54. The issue it fixes is #2028.

Rationale for this change

A transient IO error on the build side of a hash join kills the whole job instead of being retried.

The retry classifier in ballista/core/src/error.rs does a shallow matches!(*e, DataFusionError::IoError(_)) on the outermost variant. Errors coming off a join's shared build side get wrapped in DataFusionError::Shared (an Arc, for sharing across consumers), so the IoError inside is never seen and the task falls through to the catch-all retryable: false arm. With AQE off the error arrives unwrapped and retry works, which is how the wrapping was narrowed down as the cause.

This turns recoverable object-store flakiness into job failures, so it is worth having on the release branch.

What changes are included in this PR?

A clean cherry-pick of b162708, unmodified.

Classifies on find_root() instead of the outermost variant, so the retryability decision is based on the root error regardless of wrapping. One-line change plus unit tests covering bare, Shared-wrapped, Context-wrapped-Shared, and non-IO cases.

Are there any user-facing changes?

No API changes. Tasks that fail with an IO error wrapped in DataFusionError::Shared are now retried rather than failing the job.


Verified locally on the branch-54 base: cargo fmt --all -- --check is clean, and cargo check --workspace --all-targets --locked completes with no warnings on a combined stack of the six backports being proposed together. Test execution is left to CI.

A retryable IO error raised on a join's shared build side arrives at the
FailedTask classifier wrapped in DataFusionError::Shared, so the shallow
matches! on the outermost variant never sees the IoError inside and the
task is marked non-retryable. Classify on find_root() instead so the
retryability decision is based on the root error regardless of wrapping.

Co-authored-by: goingforstudying-ctrl <goingforstudying-ctrl@users.noreply.github.com>
(cherry picked from commit b162708)
@andygrove
andygrove marked this pull request as ready for review August 6, 2026 12:47
@andygrove
andygrove merged commit 1f216df into apache:branch-54 Aug 6, 2026
17 checks passed
@andygrove
andygrove deleted the fix/shared-error-classification-branch-54 branch August 6, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants