nathanb9 commented on PR #21425: URL: https://github.com/apache/datafusion/pull/21425#issuecomment-4286002671
@milenkovicm > for discussion, what if spillable operators get access to 'reclaim stream' which they must poll together with 'batch stream" this way operator could either handle spill or batch so the state is never mutated concurrently Thanks for taking the time @2010YOUY01 @Kontinuation. Any thoughts on the above?^ I think this is a nice pattern and also addresses all major concerns. Conceptually, stream is most intuitive to me and most critically implementing the operators reclaim with needs no locks / impossible concurrent access, and can continue doing async spills IO. Im working on experimenting with this now. One concern ive found experimenting with doing this with streams: During execution lets say we have `SortExec.poll_next()` → `RepartitionExec.poll_next()` → `try_grow()` FAILS → `pool.reclaim()` → sends signal to `SortExec` → waits for `SortExec` → DEADLOCK (`SortExec` is stuck waiting for `RepartitionExec` to return) Basically we could one operator A which is streaming data to another B which runs out memory and wants to reclaim from A. -- 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]
