Check if object is empty instead of comparing to an empty object

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • ALL
    • Repl 2024-10-28
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      In replsettest.js we compare `nodeOptions === {}` and `primaryOptions === {}`  with the intent to check if the variable is an empty object.
       
      Instead this compares references and will always return false.

      See: https://github.com/mongodb/mongo/blob/9427d2d01c6f1539bd48a83ec695752767859d08/jstests/libs/replsettest.js#L3485

      https://github.com/mongodb/mongo/blob/9427d2d01c6f1539bd48a83ec695752767859d08/jstests/libs/replsettest.js#L952

            Assignee:
            Joy Wang
            Reporter:
            Adrian Gonzalez Montemayor
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: