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

ServerHeartbeatStartedEvent does not publish correctly

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.12.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      From the specifications, ServerHeartbeatStartedEvent should be "published when the server monitor sends its hello or legacy hello call to the server": https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-logging-and-monitoring.rst#events-api

      In addition to publishing before sending a hello command, the Go Driver will publish ServerHeartbeatStartedEvent when checking on the server after a connection is closed / a check is canceled: https://github.com/mongodb/mongo-go-driver/blob/master/x/mongo/driver/topology/server.go#L802 . This is not defined behavior and could result in a publication without sending a hello command to the server.

      Suggest removing the block on L802 .

            Assignee:
            qingyang.hu@mongodb.com Qingyang Hu
            Reporter:
            preston.vasquez@mongodb.com Preston Vasquez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: