3969b40925
* test: regression test for #8378 * fix: avoid recursive locking during LRU shutdown Fixes the following construct during shutdown: 1. `clean_up_loop` holds `members` lock 2. calls `member.remove_keys` 3. `CallbackHandle::execute_requests` requests upgrades weak ref and gets lock 4. other thread drops last external reference to pool member, the upgraded weak ref from (3) is now the last strong ref 5. `CallbackHandle::execute_requests` finishes, drops pool member 6. dropping that pool member calls `ResourcePool::unregister_member` which is the same lock as we got in (1) => deadlock We now just avoid modifying `members` during shutdown and just hold a weak ref there. As a side effect, the `last_used` addressable heap moves around a bit an is no longer `Arc`ed (see updated diagram). --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
benches | ||
src | ||
Cargo.toml |