-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Replication, Sharding
The pattern comes up a bunch of “lock the session mutex and then check if there is an active transaction” https://github.com/mongodb/mongo/blob/4e8b282809ba28eb2da14435a91981a3821343e1/src/mongo/db/session.cpp#L710-L715. Sometimes we call checkValid too. It’s not clear to me when we call one vs. the other. Making this clearer and providing a mechanism to lock the mutex and automatically make all of the required checks would prevent bugs and make the concurrency story clearer.
- duplicates
-
SERVER-37244 Implement checkOutSessionForKill API and switch all non-migration callers to use it
- Closed