killzoner commented on code in PR #1903:
URL: 
https://github.com/apache/datafusion-ballista/pull/1903#discussion_r3483256364


##########
ballista/scheduler/src/state/execution_stage.rs:
##########
@@ -554,15 +554,40 @@ impl RunningStage {
         }
     }
 
-    /// Converts this running stage to a failed stage with the given error 
message.
+    /// Converts this running stage to a failed stage. Still-running tasks are 
recorded
+    /// as cancelled (`Failed(TaskKilled)`) since failing the stage cancels 
them.
     pub fn to_failed(&self, error_message: String) -> FailedStage {
+        let task_infos = self
+            .task_infos
+            .iter()
+            .map(|task_info| {
+                task_info.as_ref().map(|info| {
+                    if matches!(info.task_status, 
task_status::Status::Running(_)) {
+                        TaskInfo {
+                            task_status: 
task_status::Status::Failed(FailedTask {
+                                error: "cancelled".to_string(),

Review Comment:
   Actually looking closer, I think the answer might be in the function 
signature `error_message`.
   
   To me the "kill" is already conveyed by `failed_reason` being `TaskKilled`, 
so any custom other error might probably be `error_message`. It would be 
duplicated with stage error message though. What do you think?
   
   Otherwise i will stick with the neutral `killed`



-- 
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