Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3256

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.17.0-beta, 1.17.0
    • Affects Version/s: None
    • Component/s: libmongoc
    • Labels:
      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. example-client.c
          3 kB
        2. curr.json
          1 kB
        3. prev.json
          1 kB

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: