diff options
author | Matthew Russotto <matthew.russotto@mongodb.com> | 2019-09-25 15:23:40 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-25 15:23:40 +0000 |
commit | b74be4837a1aaf547fd6e8c1095018a4a5d48829 (patch) | |
tree | 5b6fbec8c7d7daa91af9facb19d063b5cb1667d2 | |
parent | e4571c1eb6034c118b69175989db7753eafc3086 (diff) | |
download | mongo-b74be4837a1aaf547fd6e8c1095018a4a5d48829.tar.gz |
SERVER-42613 getHashes should default to liveSlaves, not _slaves in replsettest.js
(cherry picked from commit 81d2b80554331f1ca428138823d27cbf2a293c52)
-rw-r--r-- | src/mongo/shell/replsettest.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index ad126bfa603..cbfa0268880 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -1706,9 +1706,9 @@ var ReplSetTest = function(opts) { this.getHashes = function(dbName, slaves) { assert.neq(dbName, 'local', 'Cannot run getHashes() on the "local" database'); - // getPrimary() repopulates 'self._slaves'. - this.getPrimary(); - slaves = slaves || this._slaves; + // _determineLiveSlaves() repopulates both 'self._slaves' and 'self._master'. If we're + // passed an explicit set of slaves we don't want to do that. + slaves = slaves || _determineLiveSlaves(); const sessions = [ this._master, |