milenkovicm commented on code in PR #1314:
URL: 
https://github.com/apache/datafusion-ballista/pull/1314#discussion_r2332423182


##########
ballista/executor/src/execution_loop.rs:
##########
@@ -88,8 +90,29 @@ pub async fn poll_loop<T: 'static + AsLogicalPlan, U: 
'static + AsExecutionPlan>
 
         match poll_work_result {
             Ok(result) => {
-                let tasks = result.into_inner().tasks;
+                let PollWorkResult {
+                    tasks,
+                    jobs_to_clean,
+                } = result.into_inner();
                 active_job = !tasks.is_empty();
+                let work_dir = PathBuf::from(&executor.work_dir);
+
+                // Clean up any state related to the listed jobs

Review Comment:
   first point is that it should not block pull thread, we could use tokio 
async but also it would make sense to have a separate facility to do file 
removal. where we can just schedule request for removal and it would do it in 
its separate threads, or similar. 
   
   we have another removal method at 
https://github.com/milenkovicm/datafusion-ballista/blob/4c9b360b51afd3f29614b43b4f3727c473e515a5/ballista/executor/src/executor_server.rs#L726
 so it we can unify them at the same time it would be great.
   
   Would something like that make sense?  



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to