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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.17.0-beta, 1.17.0
    • Component/s: libmongoc
    • Labels:
      None
    • Story Points:
      2

      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

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: