summaryrefslogtreecommitdiff
path: root/jstests/libs
diff options
context:
space:
mode:
authorJacob Evans <jacob.evans@mongodb.com>2019-12-11 21:33:49 +0000
committerA. Jesse Jiryu Davis <jesse@mongodb.com>2020-01-27 15:35:41 -0500
commitdd0fe1c4f66219fdfa2f78745c98b271a45a796d (patch)
treee32f49629685b4ee6fc05222d274fe54f7f13b27 /jstests/libs
parent501d02e428ac98214327dce167597db056edb53a (diff)
downloadmongo-dd0fe1c4f66219fdfa2f78745c98b271a45a796d.tar.gz
SERVER-44475 Remove Query Knob
Diffstat (limited to 'jstests/libs')
-rw-r--r--jstests/libs/override_methods/implicitly_shard_accessed_collections.js2
-rw-r--r--jstests/libs/profiler.js10
2 files changed, 4 insertions, 8 deletions
diff --git a/jstests/libs/override_methods/implicitly_shard_accessed_collections.js b/jstests/libs/override_methods/implicitly_shard_accessed_collections.js
index fc83df394cb..3e7e8dc3c55 100644
--- a/jstests/libs/override_methods/implicitly_shard_accessed_collections.js
+++ b/jstests/libs/override_methods/implicitly_shard_accessed_collections.js
@@ -181,7 +181,7 @@ Mongo.prototype.runCommand = function(dbName, cmdObj, options) {
let outputSpec = cmdObj.out;
if (typeof (outputSpec) === "string") {
this.getDB(dbName)[outputSpec].drop(); // This will implicitly shard it.
- outputSpec = {replace: outputSpec, sharded: true};
+ outputSpec = {replace: outputSpec};
} else if (typeof (outputSpec) !== "object") {
// This is a malformed command, just send it along.
return originalRunCommand.apply(this, arguments);
diff --git a/jstests/libs/profiler.js b/jstests/libs/profiler.js
index 63af457299b..45b64d33d30 100644
--- a/jstests/libs/profiler.js
+++ b/jstests/libs/profiler.js
@@ -4,13 +4,9 @@
function buildCommandProfile(command, sharded) {
let commandProfile = {};
- if (sharded && command.mapReduce) {
- // Unlike other read commands, mapReduce is rewritten to a different format when sent to
- // shards if the input collection is sharded, because it is executed in two phases.
- // We do not check for the 'map' and 'reduce' fields, because they are functions, and
- // we cannot compaare functions for equality.
- commandProfile["command.out"] = {$regex: "^tmp.mrs"};
- commandProfile["command.shardedFirstPass"] = true;
+ if (command.mapReduce) {
+ // MapReduce is rewritten to an aggregate pipeline.
+ commandProfile["command.aggregate"] = command.mapReduce;
} else if (command.update) {
// Updates are batched, but only allow using buildCommandProfile() for an update batch that
// contains a single update, since the profiler generates separate entries for each update