[SERVER-68237] Internal session pool may not reuse its session Created: 22/Jul/22  Updated: 09/Aug/22  Resolved: 09/Aug/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Jack Mulrow Assignee: Sanika Phanse (Inactive)
Resolution: Duplicate Votes: 0
Labels: sharding-nyc-subteam3, txn-api-improvements
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-67466 Internal transactions API may be memo... Closed
Operating System: ALL
Sprint: Sharding 2022-08-08, Sharding 2022-08-22
Participants:
Linked BF Score: 7

 Description   

When the internal transaction API is used by a command in a session that is not a retryable write, it will use create a "child" session based on the user session for its transaction, using the InternalSessionPool to reuse the same child session for that user session. The API will return its session to the pool in the destructor for one of its types (Transaction), which due to `shared_from_this` uses extending its lifetime may lead the destructor to run on an executor thread instead of the user command's thread. If this runs slow enough, a subsequent command for the same user session may fail to find the child session in the pool and create a new one, preventing session reuse.


Generated at Thu Feb 08 06:10:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.