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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 1.17.0-beta, 1.17.0
    • None
    • libmongoc
    • None

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: