-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
Execution Team 2025-01-06
The goal in SERVER-96701 is to create a new policy around the WiredTigerSessionCache shutting down wherein
A) A WiredTigerSession cannot be checked out from the session cache while the cache is shutting down;
B) The session cache cannot be shut down while a WiredTigerSession that has been checked out of the cache has not been returned to the cache
Currently, if an OperationContext has a recovery unit that has a WiredTigerSession checked out, that session will not be released back into the cache until the recovery unit is destructed. This can create self-deadlocks with the above-described policy where in places like this, in the shutdown path, the OperationContext in the scope of the shutdownTask function has its session still checked out while we call into the storage engine shutdown code.
One hacky way of getting around this is to destruct the recovery unit likeso:
{ // This should destruct any session on the recovery unit auto ru = opCtx->releaseRecoveryUnit_DO_NOT_USE(); }
But this shouldn't be the official way of accomplishing this.
This ticket would look into creating some form of API for releasing the session back into the cache in situations like this. This could either expose the API for releaseSession() to a higher level, or create some form of workaround for otherwise destructing the recovery unit once we no longer need it from the operation context.
- is depended on by
-
SERVER-97689 Release WiredTigerSessions that would prevent shutting down with new session cache shutdown policy
- Open
-
SERVER-96701 Create new policy around interaction between WiredTigerSessionCache and shutting down
- Blocked
- related to
-
SERVER-96701 Create new policy around interaction between WiredTigerSessionCache and shutting down
- Blocked