Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2092

MongoClient.close may create new connections

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.5, 3.6, 3.7, 3.8, 3.9, 3.10
    • Fix Version/s: 3.10.1
    • Component/s: None
    • Labels:
      None

      Description

      Discovered while investigating PYTHON-2089; MongoClient.close may actually create new connections during the call to MongoClient._process_periodic_tasks() which in turn calls Topology.update_pool(). This is useless work since the newly created connections are immediately closed. To fix this we should avoid calling Topology.update_pool() when closing a MongoClient.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shane.harvey Shane Harvey
              Reporter:
              shane.harvey Shane Harvey
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: