pepijnve commented on code in PR #23522:
URL: https://github.com/apache/datafusion/pull/23522#discussion_r3588259248
##########
datafusion/physical-plan/src/spill/spill_pool.rs:
##########
@@ -723,7 +721,7 @@ impl Stream for SpillPoolReader {
}
// No files in queue - check if writer is done
- if shared.writer_dropped {
+ if shared.active_writer_count == 0 {
Review Comment:
The `SpillPoolWriter` plays the role of RAAI guard itself, doesn't it? It's
incremented when a `SpillPoolWriter` is cloned, and decremented on `drop`.
The name `active_writer_count` is a bit misleading. It does not reflect the
number of writers currently writing a batch. It reflects the number of writers
that still exist.
--
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]