xudong963 commented on code in PR #22246:
URL: https://github.com/apache/datafusion/pull/22246#discussion_r3254041592
##########
datafusion/execution/src/disk_manager.rs:
##########
@@ -210,33 +211,57 @@ impl DiskManager {
);
Ok(Arc::new(Self {
local_dirs: Mutex::new(Some(local_dirs)),
- max_temp_directory_size: DEFAULT_MAX_TEMP_DIRECTORY_SIZE,
+ max_temp_directory_size:
AtomicU64::new(DEFAULT_MAX_TEMP_DIRECTORY_SIZE),
used_disk_space: Arc::new(AtomicU64::new(0)),
active_files_count: Arc::new(AtomicUsize::new(0)),
}))
}
DiskManagerConfig::Disabled => Ok(Arc::new(Self {
local_dirs: Mutex::new(None),
- max_temp_directory_size: DEFAULT_MAX_TEMP_DIRECTORY_SIZE,
+ max_temp_directory_size:
AtomicU64::new(DEFAULT_MAX_TEMP_DIRECTORY_SIZE),
used_disk_space: Arc::new(AtomicU64::new(0)),
active_files_count: Arc::new(AtomicUsize::new(0)),
})),
}
}
+ /// Set the max temp directory size. Requires exclusive access.
+ ///
+ /// For runtime adjustment without `&mut self`, use
+ /// [`Self::update_max_temp_directory_size`] instead.
pub fn set_max_temp_directory_size(
Review Comment:
`set_max_temp_directory_size(&mut self, ...)` is now redundant. It does
exactly the same thing as update_max_temp_directory_size but requires &mut.
Keeping both is mildly confusing
--
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]