Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2218

Update connection idle deadline when checking connection back into pool

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Unknown Unknown
    • 1.9.0
    • None
    • None
    • None

    Description

      Currently a connection's "idle deadline" is increased in the Go driver only when reading writing to the connection. However, the CMAP spec defines "idle" as:

      Idle: The Connection is currently "available" (as defined below) and has been for longer than maxIdleTimeMS.

      "Available" is defined as:

      The Connection has been established and is waiting in the pool to be checked out.

      As a result, it's currently possible to check in a connection to the pool that has not been read from or written to for more than maxIdleTimeMS and it will be considered stale due to idle timeout. According to the definition of "idle" in the CMAP spec, that should be impossible.

      Update the Go driver to increase the connection's idle deadline when it is checked into the pool.

      Attachments

        Activity

          People

            matt.dale@mongodb.com Matt Dale
            matt.dale@mongodb.com Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: