summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Boros <ian.boros@mongodb.com>2020-05-26 10:50:31 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-26 15:13:03 +0000
commit89f3a36faf61d2a0345f64d76cb1284b00397e69 (patch)
treee15816f67f063603b22bc442fa89177b7bef0bfe
parente9011a1da5f3aa8f4a006a3a99372bd044c73324 (diff)
downloadmongo-89f3a36faf61d2a0345f64d76cb1284b00397e69.tar.gz
Revert "SERVER-48300 Prevent spurious failure of kill_pinned_cursor.js"
This reverts commit 26effc710705d610dd16061c93612e02d0a2aa71.
-rw-r--r--jstests/sharding/kill_pinned_cursor.js37
1 files changed, 11 insertions, 26 deletions
diff --git a/jstests/sharding/kill_pinned_cursor.js b/jstests/sharding/kill_pinned_cursor.js
index 3ab92a1c66b..3fabfba7e37 100644
--- a/jstests/sharding/kill_pinned_cursor.js
+++ b/jstests/sharding/kill_pinned_cursor.js
@@ -16,7 +16,6 @@ const kFailPointName = "waitAfterPinningCursorBeforeGetMoreBatch";
const kFailpointOptions = {
shouldCheckForInterrupt: true
};
-const kCommandCommentString = "kill_pinned_cursor_js_test";
const st = new ShardingTest({shards: 2});
const kDBName = "test";
@@ -93,7 +92,7 @@ function testShardedKillPinned(
{configureFailPoint: kFailPointName, mode: "alwaysOn", data: kFailpointOptions}));
// Run a find against mongos. This should open cursors on both of the shards.
- let findCmd = {find: coll.getName(), batchSize: 2, comment: kCommandCommentString};
+ let findCmd = {find: coll.getName(), batchSize: 2};
if (useSession) {
// Manually start a session so it can be continued from inside a parallel shell.
@@ -181,18 +180,11 @@ for (let useSession of [true, false]) {
// This function ignores the mongos cursor id, since it instead uses currentOp to
// obtain an op id to kill.
killFunc: function() {
- let currentGetMoresArray = shard0DB.getSiblingDB("admin")
- .aggregate([
- {$currentOp: {}},
- {
- $match: {
- "command.getMore": {$exists: true},
- "command.comment": kCommandCommentString
- }
- }
- ])
- .toArray();
- assert.eq(1, currentGetMoresArray.length, currentGetMoresArray);
+ let currentGetMoresArray =
+ shard0DB.getSiblingDB("admin")
+ .aggregate([{$currentOp: {}}, {$match: {"command.getMore": {$exists: true}}}])
+ .toArray();
+ assert.eq(1, currentGetMoresArray.length);
let currentGetMore = currentGetMoresArray[0];
let killOpResult = shard0DB.killOp(currentGetMore.opid);
assert.commandWorked(killOpResult);
@@ -207,18 +199,11 @@ for (let useSession of [true, false]) {
// This function ignores the mongos cursor id, since it instead uses currentOp to
// obtain the cursor id of one of the shard cursors.
killFunc: function() {
- let currentGetMoresArray = shard0DB.getSiblingDB("admin")
- .aggregate([
- {$currentOp: {}},
- {
- $match: {
- "command.getMore": {$exists: true},
- "command.comment": kCommandCommentString
- }
- }
- ])
- .toArray();
- assert.eq(1, currentGetMoresArray.length, currentGetMoresArray);
+ let currentGetMoresArray =
+ shard0DB.getSiblingDB("admin")
+ .aggregate([{$currentOp: {}}, {$match: {"command.getMore": {$exists: true}}}])
+ .toArray();
+ assert.eq(1, currentGetMoresArray.length);
let currentGetMore = currentGetMoresArray[0];
let shardCursorId = currentGetMore.command.getMore;
let cmdRes =