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

Only close heartbeat connections after they're opened

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

      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).

            Assignee:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Reporter:
            patrick.meredith@mongodb.com Patrick Meredith
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: