summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthew Russotto <matthew.russotto@mongodb.com>2019-09-25 15:23:40 +0000
committerevergreen <evergreen@mongodb.com>2019-09-25 15:23:40 +0000
commitb74be4837a1aaf547fd6e8c1095018a4a5d48829 (patch)
tree5b6fbec8c7d7daa91af9facb19d063b5cb1667d2 /src
parente4571c1eb6034c118b69175989db7753eafc3086 (diff)
downloadmongo-b74be4837a1aaf547fd6e8c1095018a4a5d48829.tar.gz
SERVER-42613 getHashes should default to liveSlaves, not _slaves in replsettest.js
(cherry picked from commit 81d2b80554331f1ca428138823d27cbf2a293c52)
Diffstat (limited to 'src')
-rw-r--r--src/mongo/shell/replsettest.js6
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,