-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
Fully Compatible
-
ALL
-
v8.0, v7.3, v7.0, v6.0
When using $_passthroughToShard with $changeStream, this targets a shard directly and goes through a different pathway in cluster_aggregate than just $changestreams. Query stats are not being collected for these queries.
If a query is made with $changeStream and $_passthroughToShard, we parse within query_stats, as it has not been parsed yet in cluster_aggregate. Currently parsing within registerRequest will error out, as $changeStream requires it to be on a mongos, which it is not set when it goes through the current path in cluster_aggregate.
Also, the usage of $_passthroughToShard is not in the pipeline but is part of the aggregate command request. We may want to store this in the key to differentiate these change stream requests.