-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
Fully Compatible
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()