Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2105

Move server session pool from MongoClient to Cluster

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0
    • Component/s: Connectivity
    • Labels:
      None

      Description

      The initial implementation of sessions has the server session pool associated with a MongoClient instance.

      While this is perfectly logical, some applications create a new MongoClient instance for every operation (we don't recommend this but don't prohibit it).

      If an application does open a new MongoClient instance for every operation, the result will be that a new server session is started for every operation. The server is never told that this server session is no longer needed so the server will end up with lots of unused sessions that won't get cleaned up until 30 minutes go by.

      We should support this scenario more efficiently by implementing the server session pool at a lower level such that a server session pool can be shared by multiple MongoClient instances.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: