dwsmith1983 commented on PR #5613:
URL: 
https://github.com/apache/datafusion-comet/pull/5613#issuecomment-5861613238

   > While a fair-pool acquire is parked in Spark's 
`ExecutionMemoryPool.acquireMemory`, the executor's `comet-memory-usage-log` 
thread blocks in `Native.getMemoryUsage` on the same lock, because reading the 
pool's reservation takes it.
   
   That is the lock this PR stops holding across the Spark call. On main, 
`try_grow` holds `state` across `try_acquire`, and `reserved()` needs the same 
lock, so the logger waits for as long as the acquire is parked. Here the limit 
check and the charge finish under the lock, and the anchor, acquire and release 
calls all run after it is dropped, so `reserved()` returns straight away with 
the in-flight bytes counted. The greedy pool keeps its usage in an atomic and 
`TrackConsumersPool` only forwards the call, so no other pool type has this 
wait.
   
   `2987a934f` adds `reserved_is_not_blocked_by_an_acquire_parked_in_spark`, 
which parks an acquire in the test stub and expects `reserved()` to return 
within a second, including the parked task's bytes. With the lock held across 
the Spark call it times out. Could you approve a CI run on that head?
   


-- 
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]

Reply via email to