mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 16:28:15 +00:00
7b87d4d13b
Make OptimizedNotify::wait_for_read/wait_for_write cancellation-safe with an RAII decrement guard so the waiter counter is decremented even when the future is dropped at the await (capped-wait timeout or task abort), preventing the counter from leaking upward on a hot lock. Fix cleanup_expired_batch so recycling into the object pool actually works: Arc::try_unwrap on a clone could never succeed, so no state was ever recycled. Collect keys during retain, remove them afterward to obtain the owned Arc, and try_unwrap that before returning the state to the pool. Refs rustfs/backlog#1035