[SERVER-86368] Update refreshTotalCount function in QueryAnalysisSampler to take into account embedded mongos Created: 07/Feb/24  Updated: 08/Feb/24

Status: Needs Scheduling
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Wenqin Ye Assignee: Backlog - Cluster Scalability
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-79353 (SA) Allow dual `ServerStatusSectionR... Backlog
Assigned Teams:
Cluster Scalability
Participants:

 Description   

Right now the refreshTotalCount() function in QueryAnalysisSampler does not take into account an embedded mongos and as a result will give an incorrect count.

The function needs to be updated so that it satisfies the following criteria (this is from Chou):

  1. On a mongod in a standalone replica set, we want to count the update, delete, findAndModify, find, aggregate, count, distinct commands that it executes.
  2. On a mongos, we want to count the update, delete, findAndModify, find, aggregate, count, distinct commands that it routes.
  3. On a shardsvr mongod without router role, we want to count the nested aggregate commands (i.e. $lookup,$graphLookup and $unionWith) that it routes.
  4. [New] On a shardsvr mongod with router role, we want to count the nested aggregate commands AND the update, delete, findAndModify, find, aggregate, count, distinct commands it routes (**).

(**) is not possible yet because the globalOpCounters count both commands that a mongod receives on the shard port and on the router port. As a result this ticket will also depend SERVER-79353 being completed. 


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