milenkovicm opened a new pull request, #1793:
URL: https://github.com/apache/datafusion-ballista/pull/1793

   # Which issue does this PR close?
   
   Closes #.
   
   # Rationale for this change
   
   The executor previously used `??` to propagate task errors, which did not 
handle panics occurring inside task futures. A panicking task would unwind past 
the executor and potentially crash the process or leave state inconsistent. 
This change wraps task execution in `catch_unwind` so both errors and panics 
are caught and converted into proper `DataFusionError` values.
   
   # What changes are included in this PR?
   
   - Wraps task future execution in 
`std::panic::AssertUnwindSafe(...).catch_unwind().await` in `executor.rs`
   - Maps task abort (`Ok(Err(_))`) to a `DataFusionError::Internal` with a 
clear "Task has been aborted!" message
   - Maps task panics (`Err(p)`) to a `DataFusionError::Internal` with the 
panic payload stringified via the existing `any_to_string` helper from 
`execution_loop`
   - Logs an error for both cases before returning
   - Converts the resulting `DataFusionError` to `BallistaError` at the call 
site via `map_err`
   
   # Are there any user-facing changes?
   
   No user-facing changes. The executor is now more resilient — panics inside 
tasks are caught and reported as errors rather than propagating uncontrolled, 
which improves stability of the executor process.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to