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

Don't clear the connection pool on Context timeout during handshake

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.5.4
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Currently we will clear the driver connection pool if we encounter any error during new connection handshake (see topology.Server#ProcessHandshakeError). If the error encountered is a driver-side timeout (e.g. a Context cancellation), that doesn't indicate a problem with connections in the pool like a network error does. Don't clear the connection pool in the case that the error encountered during new connection handshake is a driver-side timeout.

      E.g. similar logic from topology.Server#ProcessError:

      // ...
      if wrappedConnErr == context.Canceled || wrappedConnErr == context.DeadlineExceeded {
      	return driver.NoChange
      }
      // ...
      

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

              Created:
              Updated:
              Resolved: