-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
If a query contains a $limit and involves a sharded collection, the query can terminate (that is, return the final response with cursor ID 0) before receiving all responses from all shards. This means the metrics will be written without considering those metrics.
This race creates the potential for instability in the metrics where different runs of the same query could have slightly different metrics. Note that there is a limit to the inaccuracy (one batch per shard).