mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-19 22:46:34 -05:00
The hill-climb monitor and idle self-exit paths could both shrink the pool past min_threads. The monitor read thread count, released the lock, then called remove_thread - but between those steps an idle worker could also self-exit, dropping below the threshold. Three changes: - _remove_thread_locked now checks min_threads (from ScalingConfig) under the same lock as the size check, refusing removal if at or below the bound. - Idle self-exit replaced with _try_remove_self_if_above which atomically checks thread count and erases under a single lock acquisition, closing the TOCTOU window. - The previous _remove_self is retained for the non-scaling paths (poison pill exit during set_threads/remove_thread). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| acutest | ||
| boost | ||
| CLI11 | ||
| fmt | ||
| khash | ||
| libfuse | ||
| nonstd | ||
| rapidhash | ||
| scope_guard | ||
| subprocess | ||