xanderbailey commented on code in PR #20672:
URL: https://github.com/apache/datafusion/pull/20672#discussion_r2886649160
##########
datafusion/physical-plan/src/spill/spill_pool.rs:
##########
@@ -247,17 +266,15 @@ impl SpillPoolWriter {
impl Drop for SpillPoolWriter {
fn drop(&mut self) {
- let mut shared = self.shared.lock();
-
- shared.active_writer_count -= 1;
- let is_last_writer = shared.active_writer_count == 0;
-
- if !is_last_writer {
+ if !self.writer_count.is_last() {
Review Comment:
Do you have to atomically decrement and check if it's the last here? Rather
than when you drop the `WriteCount`
--
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]