[SERVER-78983] queryStats key hash should persist through ClusterFind::runGetMore Created: 14/Jul/23  Updated: 29/Oct/23  Resolved: 25/Jul/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc9

Type: Improvement Priority: Major - P3
Reporter: Maddie Zechar Assignee: Maddie Zechar
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Participants:

 Description   

This issue was found when SERVER-77184 was committed and it generated a hot BF in noPassthrough suites on query_stats_collect_on_mongos.js. 

 

 For this mongos query, when setEndOfOpMetrics() is called from ClusterFind::runQueryWithoutRetrying, the queryStats key hash is set on debug. But when we run a getMore to exhaust the cursor, ClusterFind::runGetMore calls setEndOfOpMetrics() and the key hash is actually _not set at that point. So with my commit, the executimeTime doesn't get recorded/updated.

 

The current fix is to just return at the top of query_stats_collect_on_mongos.js, however this ticket should address why the hash isn't persisted through the setEndOfOpMetrics() call in ClusterFind::runGetMore()



 Comments   
Comment by Githook User [ 25/Jul/23 ]

Author:

{'name': 'Maddie Zechar', 'email': 'maddie.zechar@mongodb.com', 'username': 'madelinezec'}

Message: SERVER-78983 queryStats key hash should persist through ClusterFind::runGetMore
Branch: master
https://github.com/mongodb/mongo/commit/5b03a4a0c0a778883167a20536ff99e473630b52

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