SDAM "changed" events emitted even if descriptions don't change

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.17.0-beta, 1.17.0
    • Affects Version/s: None
    • Component/s: libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The SDAM monitoring spec states that the ServerDescriptionChangedEvent must be emitted...

      When the old server description is not equal to the new server description

      And similarly, the TopologyDescriptionChangedEvent must be emitted...

      When the old topology description is not equal to the new topology description.

      Though, it does not appear that we check if the previous and new server descriptions differ when generating the events here

      Note the comparison for ServerDescription equality is described here.

      I've validated that we incorrectly send events with the attached modification to example-client.c, which prints out two SDAM ServerDescriptionChanged events with equal isMaster replies, and example output in curr/prev.json of two equivalent isMaster replies that were printed.

        1. curr.json
          1 kB
        2. example-client.c
          3 kB
        3. prev.json
          1 kB

            Assignee:
            Kevin Albertson
            Reporter:
            Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: