summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHana Pearlman <hana.pearlman@mongodb.com>2021-10-05 19:29:36 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-10-05 20:02:02 +0000
commit83ab4ae6cc436ac73b69bd1e540736fffc3b3832 (patch)
tree8a6a5670ea91cd688c7446c99c2ff7d27175f4c1
parent0300f19cd738e58cdeaa88b7406a2f38718b0ad9 (diff)
downloadmongo-83ab4ae6cc436ac73b69bd1e540736fffc3b3832.tar.gz
SERVER-60446: Only increase log level for query in sharded lookup tests
-rw-r--r--jstests/sharding/query/lookup_unionWith_subpipeline_local_read.js3
-rw-r--r--jstests/sharding/query/sharded_lookup_execution.js8
2 files changed, 7 insertions, 4 deletions
diff --git a/jstests/sharding/query/lookup_unionWith_subpipeline_local_read.js b/jstests/sharding/query/lookup_unionWith_subpipeline_local_read.js
index 8c5cb8be9f5..dfdf31f128a 100644
--- a/jstests/sharding/query/lookup_unionWith_subpipeline_local_read.js
+++ b/jstests/sharding/query/lookup_unionWith_subpipeline_local_read.js
@@ -20,7 +20,6 @@ const st = new ShardingTest({name: jsTestName(), mongos: 1, shards: 2, rs: {node
const dbName = jsTestName() + '_db';
st.s0.setCausalConsistency(true);
const mongosDB = st.s0.getDB(dbName);
-mongosDB.setLogLevel(3);
const local = mongosDB.local;
const foreign = mongosDB.foreign;
@@ -28,7 +27,7 @@ const foreign = mongosDB.foreign;
assert.commandWorked(mongosDB.adminCommand({enableSharding: mongosDB.getName()}));
st.ensurePrimaryShard(mongosDB.getName(), st.shard0.shardName);
-// Turn on the profiler.
+// Turn on the profiler and increase the query log level for both shards.
for (let rs of [st.rs0, st.rs1]) {
const primary = rs.getPrimary();
const secondary = rs.getSecondary();
diff --git a/jstests/sharding/query/sharded_lookup_execution.js b/jstests/sharding/query/sharded_lookup_execution.js
index 2cc8323a7c7..9c332539455 100644
--- a/jstests/sharding/query/sharded_lookup_execution.js
+++ b/jstests/sharding/query/sharded_lookup_execution.js
@@ -15,7 +15,7 @@ load("jstests/aggregation/extras/utils.js"); // For arrayEq.
load("jstests/libs/profiler.js"); // For profilerHas*OrThrow helper functions.
load("jstests/libs/log.js"); // For findMatchingLogLines.
-const st = new ShardingTest({shards: [{verbose: 3}, {verbose: 3}], mongos: 2});
+const st = new ShardingTest({shards: 2, mongos: 2});
const testName = "sharded_lookup";
const mongosDB = st.s0.getDB(testName);
@@ -24,9 +24,13 @@ const shardList = [st.shard0.getDB(testName), st.shard1.getDB(testName)];
assert.commandWorked(mongosDB.adminCommand({enableSharding: mongosDB.getName()}));
st.ensurePrimaryShard(mongosDB.getName(), st.shard0.shardName);
-// Turn on the profiler for both shards.
+// Turn on the profiler and increase the query log level for both shards.
assert.commandWorked(st.shard0.getDB(testName).setProfilingLevel(2));
assert.commandWorked(st.shard1.getDB(testName).setProfilingLevel(2));
+assert.commandWorked(
+ st.shard0.adminCommand({setParameter: 1, logComponentVerbosity: {query: {verbosity: 3}}}));
+assert.commandWorked(
+ st.shard1.adminCommand({setParameter: 1, logComponentVerbosity: {query: {verbosity: 3}}}));
const ordersColl = mongosDB.orders;
const reviewsColl = mongosDB.reviews;