Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-1030

Drivers should check out an implicit session only after checking out a connection

    • Type: Icon: Spec Change Spec Change
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: Sessions
    • Labels:
      None
    • Needed
    • Hide

      Drivers need to implement a new prose test, and implement either a refactor of their sessions allocation to occur after connection checkout or lazily allocate an existing session after successful checkout.

      Show
      Drivers need to implement a new prose test, and implement either a refactor of their sessions allocation to occur after connection checkout or lazily allocate an existing session after successful checkout.
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-4197 Works as Designed
      CXX-2398 Works as Designed
      CSHARP-3927 Done
      GODRIVER-2197 Fixed 1.11.0
      JAVA-4365 Fixed 4.5.0
      NODE-3697 Fixed 4.5.0
      PHPLIB-747 Won't Do
      PYTHON-2956 Fixed 4.1
      MOTOR-841 Duplicate
      RUBY-2820 Fixed 2.18.0
      RUST-1069 Fixed 2.5.0
      SWIFT-1383 Fixed 1.3.0
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-4197 Works as Designed CXX-2398 Works as Designed CSHARP-3927 Done GODRIVER-2197 Fixed 1.11.0 JAVA-4365 Fixed 4.5.0 NODE-3697 Fixed 4.5.0 PHPLIB-747 Won't Do PYTHON-2956 Fixed 4.1 MOTOR-841 Duplicate RUBY-2820 Fixed 2.18.0 RUST-1069 Fixed 2.5.0 SWIFT-1383 Fixed 1.3.0

      Problem:
      When the number of concurrent application requests are larger than the number of available connections, the driver may generate many more implicit sessions than connections. For example with maxPoolSize=1 and 100 threads, 100 implicit sessions may be created. This increases the load on the server since session state is cached in memory. In the worst case this kind of workload can hit the session limit and trigger TooManyLogicalSessions.

      Proposed solution:
      Drivers should check out an implicit session only after checking out a connection. This change will limit the number of implicit sessions to no greater than an application's maxPoolSize (ignoring operations that hold on to the session like cursors).

      This change would not have any effect on explicit sessions created with startSession.

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            esha.bhargava@mongodb.com Esha Bhargava
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: