Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-42613

getHashes should default to liveSlaves, not _slaves in replsettest.js

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.2.1, 4.3.1
    • None
    • Replication
    • Fully Compatible
    • ALL
    • v4.2, v4.0
    • Repl 2019-08-26, Repl 2019-09-09, Repl 2019-09-23
    • 17

    Description

      The getHashes() method calls getPrimary() to refresh the list of slaves. It is possible at the time this is called that no master is electable. And there's no point in checking the hashes for a node which is down. Furthermore, if we are given a list of slaves, we should not change this._master here. So if no list of slaves is provided, we should call _determineLiveSlaves() instead of getPrimary(). And if a list of slaves is provided, we should not call either method.

      Attachments

        Activity

          People

            matthew.russotto@mongodb.com Matthew Russotto
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: