Problem
ServerState::mu is a single std::mutex protecting 8 data structures. Under 32 concurrent snapshot.capture requests, one lock serializes all allocation.
Proposed Solution
Split into three locks:
- snapshots_mu: snaps + pinned_counts + lru_order + snap_counter
- sessions_mu: sessions + sessionCount
- event_mu: event_counter + event_log
No operation holds more than one lock currently, so this is a safe split.
References
Problem
ServerState::mu is a single std::mutex protecting 8 data structures. Under 32 concurrent snapshot.capture requests, one lock serializes all allocation.
Proposed Solution
Split into three locks:
No operation holds more than one lock currently, so this is a safe split.
References