Pinned connections are sometimes returned to the pool twice

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Unknown
    • 3.12, 4.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      PYTHON-2677 refactored the Pool to remove the "checkout" argument in favor of the new SocketInfo.pin_txn/pin_cursor() methods. However the new logic has a bug. When the operation completes successfully and unpins the connection at the same time, the connection will be returned to the pool twice. Once by the operation itself and once again when exiting pool.get_socket.

      An example is when a cursor returns the entire result in the first batch. Both the Cursor and pool.get_socket return the connection to the pool.

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

                Created:
                Updated:
                Resolved: