Skip to content

Commit

Permalink
SERVER-89690 Add diagnostic log messages to query_stats_regex.js [7.0…
Browse files Browse the repository at this point in the history
…] (#28523)

GitOrigin-RevId: 2f3fe522712c4d6fc18c0bfdbad7b10237dbf6ae
  • Loading branch information
shaargtz authored and MongoDB Bot committed Nov 19, 2024
1 parent 203feb4 commit 5d57590
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jstests/noPassthrough/queryStats/query_stats_regex.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ assert.commandWorked(bulk.execute());
{
coll.find({foo: {$regex: "/^ABC/i"}}).itcount();
const queryStats = getLatestQueryStatsEntry(testDB);
assert.eq({"foo": {"$regex": "?string"}}, queryStats.key.queryShape.filter);
assert.eq({"foo": {"$regex": "?string"}}, queryStats.key.queryShape.filter, queryStats);
}

{
coll.find({foo: {$regex: ".*", $options: "m"}}).itcount();
const queryStats = getLatestQueryStatsEntry(testDB);
assert.eq({"foo": {"$regex": "?string", "$options": "?string"}},
queryStats.key.queryShape.filter);
queryStats.key.queryShape.filter,
queryStats);
}

MongoRunner.stopMongod(conn);
Expand Down

0 comments on commit 5d57590

Please sign in to comment.