[SERVER-58766] [Optimization] Add session pool for internal sessions Created: 22/Jul/21  Updated: 29/Oct/23  Resolved: 13/Oct/21

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

Type: Task Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Jonathan Lee
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-58751 Support internal sessions Closed
Related
related to SERVER-70093 move OpObserver tests to new target i... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2021-10-04, Sharding 2021-10-18
Participants:
Story Points: 3

 Description   

From the design:

To avoid creating too many sessions, internal sessions used for a command not running in a session can come from a session pool. To make these internals sessions reusable, the pool will need to track the last used txnNumber in each session and the user of that session can only run transactions with txnNumber greater than the last used one.

This should be very similar to the ShardingDDLCoordinator::SessionCache so we may want to extend that class (and move it out of the ShardingDDLCoordinator class). 



 Comments   
Comment by Githook User [ 13/Oct/21 ]

Author:

{'name': 'Jonathan Lee', 'email': 'jonathan.lee@mongodb.com', 'username': 'jonatlee'}

Message: SERVER-58766 Add session pool for internal sessions
Branch: master
https://github.com/mongodb/mongo/commit/791308c096563937ca6e8d35e7ee326c735b17ae

Generated at Thu Feb 08 05:45:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.