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

Only close heartbeat connections after they're opened

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: 1.1.3
    • Fix Version/s: 1.2.1, 1.1.4
    • Component/s: Connections
    • Labels:
      None
    • Case:

      Description

      When mongod is started after a client using SSL, heartbeat connections never succeed. When SSL is not used, the heartbeats correctly pick up once mongod is ready to receive connections.

      https://github.com/pmeredit/sqlproxy/tree/BI-2413

      Is a branch of sqlproxy with a repro of this issue.

      https://github.com/pmeredit/sqlproxy/blob/BI-2413/REPRO_README.txt

      Describes how to run the repro.

       

      EDIT: The root cause of this issue is that custom dialers return connections that appear to be non-nil but have a nil value due to the nil interface issue (https://golang.org/doc/faq#nil_error). In the heartbeat code, the driver should only call nc.Close if the branch that executes a heartbeat is taken (https://github.com/mongodb/mongo-go-driver/blob/master/x/mongo/driver/topology/server.go#L543).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              divjot.arora Divjot Arora
              Reporter:
              patrick.meredith Patrick Meredith
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: