-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
Fully Compatible
-
ALL
-
v7.3
coll.find({x: {$regex: ".*", $options: "i"}}).toArray();
and
coll.find({x: {$regex: ".*"}}).toArray();
(incorrectly) have the same query shape:
"queryShape" : { "cmdNs" : { "db" : "test", "coll" : "c" }, "command" : "find", "filter" : { "x" : { "$regex" : "?string" } } }
This is likely because the representative value for $regex $options is "", which must get re-parsed as "we have no $options". The result is that we end up with duplicate shapes in the $queryStats output when two queries that are the same except for the existence of $options are run.
- is related to
-
SERVER-86384 Duplicate records in queryshapes key subdocument
- Backlog
- related to
-
SERVER-89690 query_stats_regex.js is missing diagnostic log messages
- Closed