-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
Create a common QueryStatsInfo struct similar to
struct QueryStatsInfo { std::unique_ptr<query_stats::Key> key; boost::optional<std::size_t> keyHash; bool disableForSubqueryExecution = false; struct CursorInfo { bool willNeverExhaust = false; } cursorInfo; struct SingleOpInfo { bool metricsRequested = false; } singleOpInfo; };
This will be used for both the OpDebug/CurOp QueryStatsInfo and also the ClientCursor and ClusterClientCursor.
This will allow for
- move checks/functions that use queryStatsInfo inside the struct and clean up query stats code overall
- pass QueryStatsInfo to writeQueryStats() and collectQueryStatsMongod/s instead of passing the key itself/flags to divorce std::moving the key from these calls.
- Use disableForSubQueryExecution/willNeverExhaust flags within writeQueryStats() to determine if the query should be collected.
And in general, it would be nice to add comments explaining some of the logic surrounding querystats.
- is related to
-
SERVER-92118 Query stats incorrectly logs find explain on views
- Closed
-
SERVER-92198 Collect query stats for distinct on a view
- Closed
-
SERVER-94171 disableForSubqueryExecution flag is not reset after subquery execution
- Closed