-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
Fully Compatible
-
ALL
-
200
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The way _runningSessionCount is updated here permits a concurrent call to waitForRunningSessions to observe _runningSessionCount == 0 before the last thread has called notify().
Then, the SessionHandler may be destroyed, making the notify() call unsafe.
To prevent this, _notificationMutex should be acquired for the duration of the decrement and notify call.
A concurrent waitForRunningSessions call will then either:
- Block on the lock, then correctly observe sessions == 0 once the dying thread releases the lock and it is safe to destroy the session handler.
- Acquire the lock, observe sessions == 1, wait on CV (releases the lock), wake when dying thread calls notify, re-acquire lock, observe sessions == 0.
- related to
-
SERVER-106702 Implement incremental read for recording files
-
- Closed
-