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

Update connection idle deadline when checking connection back into pool

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.9.0
    • Affects Version/s: None
    • Component/s: None
    • None

      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.

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

              Created:
              Updated:
              Resolved: