andygrove commented on code in PR #2775:
URL:
https://github.com/apache/datafusion-ballista/pull/2775#discussion_r4601905913
##########
ballista/executor/src/executor_process.rs:
##########
@@ -522,15 +564,12 @@ async fn start_executor_process_inner(
let scheduler_port = opt.scheduler_port;
let scheduler_url = format!("http://{scheduler_host}:{scheduler_port}");
- let work_dir = if let Some(work_dir) = opt.work_dir.clone() {
- work_dir
- } else if let Some(temp_dir) =
TempDir::new()?.path().to_str().map(ToOwned::to_owned)
- {
- temp_dir
- } else {
- return Err(BallistaError::Configuration(
- "Unable to bind work dir".to_string(),
- ));
+ let (work_dir, _default_work_dir_owner) = match opt.work_dir.clone() {
Review Comment:
Tiny suggestion. This binding is the whole fix, and renaming it to `_` would
quietly drop the guard again without the test noticing. Could you add a short
comment here, something like "keep the guard alive until the executor exits, or
the directory is deleted at startup"?
--
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]