Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-86368

Update refreshTotalCount function in QueryAnalysisSampler to take into account embedded mongos

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • 8.3 Required
    • Affects Version/s: None
    • Component/s: None
    • Cluster Scalability
    • Cluster Scalability Priorities

      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. 

            Assignee:
            backlog-server-cluster-scalability [DO NOT USE] Backlog - Cluster Scalability
            Reporter:
            wenqin.ye@mongodb.com Wenqin Ye
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: