diff options
author | Matthew Russotto <matthew.russotto@mongodb.com> | 2021-04-28 15:07:12 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-05-12 15:12:20 +0000 |
commit | 0c3335b6a4c2281d1b1650508c3075752cc12c2d (patch) | |
tree | fcc774667b0858f626b4f4be8a2c8db93ff84ebc | |
parent | 79985071e108ee36a3bf4744f7c77a5b2bf3a7b5 (diff) | |
download | mongo-0c3335b6a4c2281d1b1650508c3075752cc12c2d.tar.gz |
SERVER-56415 AwaitNodesAgreeOnPrimary doesn't work when given non-default set of nodes
(cherry picked from commit 6e88994a34e7882e1c9692fea653ed625e6e1c1b)
-rw-r--r-- | src/mongo/shell/replsettest.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index 330be6080ea..94c997648fe 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -825,8 +825,8 @@ var ReplSetTest = function(opts) { // Node sees two primaries. if (nodesPrimary !== -1) { print("AwaitNodesAgreeOnPrimary: Retrying because " + nodes[i].name + - " thinks both " + nodes[nodesPrimary].name + " and " + - nodes[j].name + " are primary."); + " thinks both " + self.nodes[nodesPrimary].name + " and " + + self.nodes[j].name + " are primary."); return false; } @@ -845,13 +845,13 @@ var ReplSetTest = function(opts) { primary = nodesPrimary; } else if (primary !== nodesPrimary) { print("AwaitNodesAgreeOnPrimary: Retrying because " + nodes[i].name + - " thinks the primary is " + nodes[nodesPrimary].name + " instead of " + - nodes[primary].name); + " thinks the primary is " + self.nodes[nodesPrimary].name + + " instead of " + self.nodes[primary].name); return false; } } - print("AwaitNodesAgreeOnPrimary: Nodes agreed on primary " + nodes[primary].name); + print("AwaitNodesAgreeOnPrimary: Nodes agreed on primary " + self.nodes[primary].name); return true; }, "Awaiting nodes to agree on primary timed out", timeout); }; |