-
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
_runningSessionCount is atomically updated to track the number of sessions currently active.
However, it is incremented by a per-session thread created in createSession. This means after createSession returns, there may be a window where _runningSessionCount reports 0 while a session really exists.
Increment the counter in createSession instead.
That is, src/mongo/replay/session_handler.cpp:55
std::thread([session = std::move(session), this] {
++_runningSessionCount;
becomes:
++_runningSessionCount;
std::thread([session = std::move(session), this] {