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

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

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

      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.

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

              Created:
              Updated:
              Resolved: