[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: |
|
||||||||||||||||
| 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: |