KR-bluejay commented on code in PR #1314:
URL:
https://github.com/apache/datafusion-ballista/pull/1314#discussion_r2331838811
##########
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:
Good point — I think the main issue is with `std::fs::remove_dir_all`.
Would it make sense to switch this to `tokio::fs::remove_dir_all` instead?
1. **Async**: Since `tokio::fs::remove_dir_all` is async, it won’t block the
work polling thread.
2. **Exception isolation**: In case of an error when removing the job
directory, I don’t think it should affect the main execution flow.
What do you think about this approach?
--
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]