Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-89496

Collect change stream queries using $_passthroughToShard for query stats

    • 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.  

            Assignee:
            erin.zhu@mongodb.com Erin Zhu
            Reporter:
            erin.zhu@mongodb.com Erin Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: