diff options
Diffstat (limited to 'jstests/sharding')
-rw-r--r-- | jstests/sharding/addshard4.js | 4 | ||||
-rw-r--r-- | jstests/sharding/auth.js | 6 | ||||
-rw-r--r-- | jstests/sharding/count_slaveok.js | 6 | ||||
-rw-r--r-- | jstests/sharding/cursor_valid_after_shard_stepdown.js | 2 | ||||
-rw-r--r-- | jstests/sharding/read_pref.js | 4 | ||||
-rw-r--r-- | jstests/sharding/recovering_slaveok.js | 4 | ||||
-rw-r--r-- | jstests/sharding/shard_insert_getlasterror_w2.js | 2 | ||||
-rw-r--r-- | jstests/sharding/warm_up_connection_pool.js | 14 |
8 files changed, 21 insertions, 21 deletions
diff --git a/jstests/sharding/addshard4.js b/jstests/sharding/addshard4.js index a23d0a13797..49e9de7b48c 100644 --- a/jstests/sharding/addshard4.js +++ b/jstests/sharding/addshard4.js @@ -15,7 +15,7 @@ r.initiate(config); // to pre-allocate files on slow systems r.awaitReplication(); -var master = r.getPrimary(); +var primary = r.getPrimary(); var members = config.members.map(function(elem) { return elem.host; @@ -49,7 +49,7 @@ r.initiate(config); // to pre-allocate files on slow systems r.awaitReplication(); -master = r.getPrimary(); +primary = r.getPrimary(); print("adding shard addshard42"); diff --git a/jstests/sharding/auth.js b/jstests/sharding/auth.js index 96e867458df..24273b29884 100644 --- a/jstests/sharding/auth.js +++ b/jstests/sharding/auth.js @@ -39,8 +39,8 @@ function logout(userObj, thingToUse) { } function getShardName(rsTest) { - var master = rsTest.getPrimary(); - var config = master.getDB("local").system.replset.findOne(); + var primary = rsTest.getPrimary(); + var config = primary.getDB("local").system.replset.findOne(); var members = config.members.map(function(elem) { return elem.host; }); @@ -110,7 +110,7 @@ d1.stopSet(); d1.startSet({keyFile: "jstests/libs/key1", restart: true}); d1.initiate(); -var master = d1.getPrimary(); +var primary = d1.getPrimary(); print("adding shard w/auth " + shardName); diff --git a/jstests/sharding/count_slaveok.js b/jstests/sharding/count_slaveok.js index 23612d96220..7ad5007be48 100644 --- a/jstests/sharding/count_slaveok.js +++ b/jstests/sharding/count_slaveok.js @@ -41,18 +41,18 @@ rst.awaitReplication(); var primary = rst.getPrimary(); var sec = rst.getSecondary(); -// Data now inserted... stop the master, since only two in set, other will still be secondary +// Data now inserted... stop the primary, since only two in set, other will still be secondary rst.stop(rst.getPrimary()); printjson(rst.status()); -// Wait for the mongos to recognize the slave +// Wait for the mongos to recognize the secondary awaitRSClientHosts(conn, sec, {ok: true, secondary: true}); // Make sure that mongos realizes that primary is already down awaitRSClientHosts(conn, primary, {ok: false}); // Need to check secondaryOk=true first, since secondaryOk=false will destroy conn in pool when -// master is down +// primary is down conn.setSecondaryOk(); // count using the command path diff --git a/jstests/sharding/cursor_valid_after_shard_stepdown.js b/jstests/sharding/cursor_valid_after_shard_stepdown.js index 574eb603e54..00c31a8ef0f 100644 --- a/jstests/sharding/cursor_valid_after_shard_stepdown.js +++ b/jstests/sharding/cursor_valid_after_shard_stepdown.js @@ -26,7 +26,7 @@ var coll = db.TestColl; assert.commandWorked(coll.insert({x: 1, value: 'Test value 1'})); assert.commandWorked(coll.insert({x: 2, value: 'Test value 2'})); -// Establish a cursor on the primary (by not using slaveOk read) +// Establish a cursor on the primary (by not using secondaryOk read) var findCursor = assert.commandWorked(db.runCommand({find: 'TestColl', batchSize: 1})).cursor; var shardVersionBeforeStepdown = diff --git a/jstests/sharding/read_pref.js b/jstests/sharding/read_pref.js index 9267cb18430..8435ef319da 100644 --- a/jstests/sharding/read_pref.js +++ b/jstests/sharding/read_pref.js @@ -129,14 +129,14 @@ var doTest = function(useDollarQuerySyntax) { return serverInfo.host + ":" + serverInfo.port.toString(); }; - // Read pref should work without slaveOk + // Read pref should work without secondaryOk var explain = getExplain("secondary"); var explainServer = getExplainServer(explain); assert.neq(primaryNode.name, explainServer); conn.setSecondaryOk(); - // It should also work with slaveOk + // It should also work with secondaryOk explain = getExplain("secondary"); explainServer = getExplainServer(explain); assert.neq(primaryNode.name, explainServer); diff --git a/jstests/sharding/recovering_slaveok.js b/jstests/sharding/recovering_slaveok.js index d9bcd44da87..7956b154361 100644 --- a/jstests/sharding/recovering_slaveok.js +++ b/jstests/sharding/recovering_slaveok.js @@ -1,6 +1,6 @@ /** - * This tests that secondaryOk'd queries in sharded setups get correctly routed when a slave goes - * into RECOVERING state, and don't break + * This tests that secondaryOk'd queries in sharded setups get correctly routed when a secondary + * goes into RECOVERING state, and don't break */ // Shard secondaries are restarted, which may cause that shard's primary to stepdown while it does diff --git a/jstests/sharding/shard_insert_getlasterror_w2.js b/jstests/sharding/shard_insert_getlasterror_w2.js index a4a0f5c540f..9db83bf5781 100644 --- a/jstests/sharding/shard_insert_getlasterror_w2.js +++ b/jstests/sharding/shard_insert_getlasterror_w2.js @@ -62,7 +62,7 @@ for (var i = numDocs; i < 2 * numDocs; i++) { } assert.commandWorked(bulk.execute({w: replNodes, wtimeout: 30000})); -// Take down two nodes and make sure slaveOk reads still work +// Take down two nodes and make sure secondaryOk reads still work var primary = replSet1.getPrimary(); var [secondary1, secondary2] = replSet1.getSecondaries(); replSet1.stop(secondary1); diff --git a/jstests/sharding/warm_up_connection_pool.js b/jstests/sharding/warm_up_connection_pool.js index bd00206cdd0..ad87cbe21c6 100644 --- a/jstests/sharding/warm_up_connection_pool.js +++ b/jstests/sharding/warm_up_connection_pool.js @@ -24,11 +24,11 @@ function runTest(setParams, connPoolStatsCheck, extraOptions) { assert.commandWorked(test.s0.adminCommand(shardCommand)); var primary; - var mId; + var pId; if (extraOptions !== undefined) { const resp = extraOptions(test); primary = resp.connString; - mId = resp.nodeId; + pId = resp.nodeId; } test.restartMongos(0); @@ -48,7 +48,7 @@ function runTest(setParams, connPoolStatsCheck, extraOptions) { }); if (extraOptions !== undefined) { - test.rs0.restart(mId); + test.rs0.restart(pId); } test.stop(); @@ -109,11 +109,11 @@ var shutdownNodeConnPoolStatsCheck = function(connPoolStats, currentShard, prima }; var shutdownNodeExtraOptions = function(test) { const nodeList = test.rs0.nodeList(); - const master = test.rs0.getPrimary(); - var mId = test.rs0.getNodeId(master); + const primary = test.rs0.getPrimary(); + var pId = test.rs0.getNodeId(primary); - test.rs0.stop(mId); - return {connString: nodeList[mId], nodeId: mId}; + test.rs0.stop(pId); + return {connString: nodeList[pId], nodeId: pId}; }; runTest(shutdownNodeParams, shutdownNodeConnPoolStatsCheck, shutdownNodeExtraOptions); |