thinkharderdev commented on code in PR #146:
URL: https://github.com/apache/arrow-ballista/pull/146#discussion_r947825692


##########
ballista/rust/executor/src/executor.rs:
##########
@@ -110,15 +121,224 @@ impl Executor {
             ))
         }?;
 
-        let partitions = exec.execute_shuffle_write(part, task_ctx).await?;
+        let (task, abort_handle) =
+            futures::future::abortable(exec.execute_shuffle_write(part, 
task_ctx));
+
+        {
+            let mut abort_handles = self.abort_handles.lock().await;
+            abort_handles.insert(
+                PartitionId {
+                    job_id: job_id.clone(),
+                    stage_id,
+                    partition_id: part,
+                },
+                abort_handle,
+            );
+        }
+
+        let partitions = task.await??;

Review Comment:
   Yeah, when you wrap the inner future in an `Abortable` it adds another 
`Result` layer (to indicate whether the task was cancelled). So the first `?` 
is unwrapping the cancellation result (i.e. `Err` if the task was cancelled) 
and the second `?` is unwrapping the inner future's result. 



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

Reply via email to