[SERVER-83630] Extend QueryStatsEntry with new metrics. Created: 28/Nov/23  Updated: 20/Dec/23  Resolved: 15/Dec/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Mark Benvenuto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-83636 Change writeQueryStats to take a stru... Closed
Problem/Incident
causes SERVER-84292 Revert move of extern template Aggreg... Closed
Assigned Teams:
Service Arch
Backwards Compatibility: Fully Compatible
Sprint: Security 2023-12-11, Security 2023-12-25
Participants:

 Description   

The new metrics to add to QueryStatsEntry:

    AggregatedMetric keysExamined;
    AggregatedMetric docsExamined;
    
    struct AggregatedBool {
        uint64_t trueCount;
        uint64_t falseCount;
    };
    AggregatedBool hasSortStage;
    AggregatedBool usedDisk;
    AggregatedBool fromMultiPlanner;
    AggregatedBool fromPlanCache;

QueryStatsEntry::toBSON will check the feature flag to avoid extra information appearing in $queryStats. This can be done by taking a boolean rather then depending on the feature flag code itself.



 Comments   
Comment by Githook User [ 14/Dec/23 ]

Author:

{'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}

Message: SERVER-83630 Extend QueryStatsEntry with new metrics

GitOrigin-RevId: 60df872875dc0ea4cd46cdc28797014eee2b7167
Branch: master
https://github.com/mongodb/mongo/commit/d3d9dfccd31446f9928c6b0a0a7bc716de4e381e

Generated at Thu Feb 08 06:52:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.