summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2020-06-17 15:52:52 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-22 18:33:41 +0000
commit5afc2424ead6c5defdb25e6d41e0366c69ebacde (patch)
tree3bbe6b81c1d8f69cef5efee01074de4fb0f4bc9c
parent10e8af0774e24dce015b7bc216691ad17a3d2532 (diff)
downloadmongo-5afc2424ead6c5defdb25e6d41e0366c69ebacde.tar.gz
SERVER-48926 Fix remaining sharding tests that incorrectly set votes to 0 on shard secondaries
(cherry picked from commit da40d32905482aa2036ff98678d909cd2d7e850a)
-rw-r--r--jstests/sharding/safe_secondary_reads_drop_recreate.js4
-rw-r--r--jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js4
-rw-r--r--jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js4
-rw-r--r--jstests/sharding/secondary_shard_version_protocol_with_causal_consistency.js4
-rw-r--r--jstests/sharding/sharding_rs2.js12
5 files changed, 14 insertions, 14 deletions
diff --git a/jstests/sharding/safe_secondary_reads_drop_recreate.js b/jstests/sharding/safe_secondary_reads_drop_recreate.js
index 85f3bc6e19b..7375971afd1 100644
--- a/jstests/sharding/safe_secondary_reads_drop_recreate.js
+++ b/jstests/sharding/safe_secondary_reads_drop_recreate.js
@@ -501,8 +501,8 @@ let scenarios = {
}
};
-// Set the secondaries to priority 0 and votes 0 to prevent the primaries from stepping down.
-let rsOpts = {nodes: [{rsConfig: {votes: 1}}, {rsConfig: {priority: 0, votes: 0}}]};
+// Set the secondaries to priority 0 to prevent the primaries from stepping down.
+let rsOpts = {nodes: [{}, {rsConfig: {priority: 0}}]};
let st = new ShardingTest({mongos: 2, shards: {rs0: rsOpts, rs1: rsOpts}});
let freshMongos = st.s0;
diff --git a/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js b/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js
index 8c5f7ea8d87..53de9bc7be6 100644
--- a/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js
+++ b/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js
@@ -391,8 +391,8 @@ commandsRemovedFromMongosIn44.forEach(function(cmd) {
testCases[cmd] = {skip: "must define test coverage for 4.2 backwards compatibility"};
});
-// Set the secondaries to priority 0 and votes 0 to prevent the primaries from stepping down.
-let rsOpts = {nodes: [{rsConfig: {votes: 1}}, {rsConfig: {priority: 0, votes: 0}}]};
+// Set the secondaries to priority 0 to prevent the primaries from stepping down.
+let rsOpts = {nodes: [{}, {rsConfig: {priority: 0}}]};
let st = new ShardingTest({mongos: 2, shards: {rs0: rsOpts, rs1: rsOpts}});
let donorShardPrimary = st.rs0.getPrimary();
diff --git a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js
index c7cd0d7ca89..5d4951c972e 100644
--- a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js
+++ b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js
@@ -326,8 +326,8 @@ commandsRemovedFromMongosIn44.forEach(function(cmd) {
testCases[cmd] = {skip: "must define test coverage for 4.2 backwards compatibility"};
});
-// Set the secondaries to priority 0 and votes 0 to prevent the primaries from stepping down.
-let rsOpts = {nodes: [{rsConfig: {votes: 1}}, {rsConfig: {priority: 0, votes: 0}}]};
+// Set the secondaries to priority 0 to prevent the primaries from stepping down.
+let rsOpts = {nodes: [{}, {rsConfig: {priority: 0}}]};
let st = new ShardingTest({mongos: 2, shards: {rs0: rsOpts, rs1: rsOpts}});
let recipientShardPrimary = st.rs1.getPrimary();
diff --git a/jstests/sharding/secondary_shard_version_protocol_with_causal_consistency.js b/jstests/sharding/secondary_shard_version_protocol_with_causal_consistency.js
index af7d221d17a..f6389079c81 100644
--- a/jstests/sharding/secondary_shard_version_protocol_with_causal_consistency.js
+++ b/jstests/sharding/secondary_shard_version_protocol_with_causal_consistency.js
@@ -9,8 +9,8 @@
load('jstests/libs/profiler.js'); // for profilerHasSingleMatchingEntryOrThrow()
-// Set the secondaries to priority 0 and votes 0 to prevent the primaries from stepping down.
-let rsOpts = {nodes: [{rsConfig: {votes: 1}}, {rsConfig: {priority: 0, votes: 0}}]};
+// Set the secondaries to priority 0 to prevent the primaries from stepping down.
+let rsOpts = {nodes: [{}, {rsConfig: {priority: 0}}]};
let st =
new ShardingTest({mongos: 2, shards: {rs0: rsOpts, rs1: rsOpts}, causallyConsistent: true});
let dbName = 'test', collName = 'foo', ns = 'test.foo';
diff --git a/jstests/sharding/sharding_rs2.js b/jstests/sharding/sharding_rs2.js
index d2a6f0e2b74..db30f91df3c 100644
--- a/jstests/sharding/sharding_rs2.js
+++ b/jstests/sharding/sharding_rs2.js
@@ -12,22 +12,22 @@
(function() {
'use strict';
-// The mongod secondaries are set to priority 0 and votes 0 to prevent the primaries
-// from stepping down during migrations on slow evergreen builders.
+// The mongod secondaries are set to priority 0 to prevent the primaries from stepping down during
+// migrations on slow evergreen builders.
var s = new ShardingTest({
shards: 2,
other: {
chunkSize: 1,
rs0: {
nodes: [
- {rsConfig: {votes: 1}},
- {rsConfig: {priority: 0, votes: 0}},
+ {},
+ {rsConfig: {priority: 0}},
],
},
rs1: {
nodes: [
- {rsConfig: {votes: 1}},
- {rsConfig: {priority: 0, votes: 0}},
+ {},
+ {rsConfig: {priority: 0}},
],
}
}