-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Integration
-
None
-
None
-
None
-
None
-
None
-
None
-
None
In SERVER-114105, we added support for the shard role to append cursor metrics to its response, to be aggregated by the router The approach taken is not sufficient, because the router will not be able to correlate the responses from the shards with the UpdateOpEntries that were chosen for sampling from the original command.
In order for aggregating metrics on the router to work right, we need to pass the original index of the UpdateOpEntry when requesting metrics, and the shards in turn need to return the index (from the original command) for which metrics are being provided. This will require a change in communication protocol between the router and the shards:
- UpdateOpEntry: instead of having a boolean field includeQueryStatsMetrics, we will have a long field includeQueryStatsMetricsForOpEntry, which if present will tell the shard the index to include in its response.
- UpdateCommandReply: will include in its response an array of structs, where each struct has a field originalOpIndex (a long) and cursorMetrics.
- Likewise SingleWriteResponse will need to be updated to include both cursor metrics and originalOpIndex so that it may be propagated into the reply
- is related to
-
SERVER-114105 Attach metrics to udpate response on shards for query stats
-
- Closed
-