Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-58766

[Optimization] Add session pool for internal sessions

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Sharding 2021-10-04, Sharding 2021-10-18
    • 3

      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). 

            Assignee:
            jonathan.lee@mongodb.com Jonathan Lee
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: