Allow $collStats to retrieve operations from all members of each shard in a cluster

    • Type: Task
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      With the introduction of the $collStats aggregation stage, users have the ability to obtain result based on read preference. 

      However, it is important for tools like mongosync to have the ability to get $collStats for each node since the index metadata could be different. Because $collStats is not querying each node, mongosync could not fully validate that there is no corrupted index for each node. 

      Add a new flag called targetAllNodes to $collStats which, if set, stipulates that it should target every data-bearing member in each shard and return an exhaustive list of results from all nodes in the cluster. 

      Ideally, it would do similar work as the targetAllNodes option for $curentOp described in SERVER-34633

            Assignee:
            Unassigned
            Reporter:
            James Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: