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

Error early if insufficient time remains for socket operation

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.8.0
    • Affects Version/s: None
    • Component/s: None

      Background & Motivation
      If a timeout occurs during a network operation the associated connection is closed. That is required since it is impossible to determine the status of the connection or whether it is reusable.

      If an operation is executed with a context timeout, and much of the time is spent before executing the network operation there may be insufficient time remaining to complete the network operation. This can cause unnecessary connection churn.

      For example, suppose the expected server RTT is 20ms. An "insert" operation is run with a 100ms timeout. There is contention in the connection pool, so 90ms is used up waiting for a connection to become available. With the remaining 10ms, the "insert" is sent, times out, and the connection is closed.

      Scope TBD

            Assignee:
            matt.dale@mongodb.com Matt Dale
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: