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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.1, 4.3.1
    • Component/s: Replication
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2, v4.0
    • Sprint:
      Repl 2019-08-26, Repl 2019-09-09, Repl 2019-09-23
    • Linked BF Score:
      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

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

              Dates

              Created:
              Updated:
              Resolved: