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

$indexStats should return results from secondaries

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution

      Currently if you run $indexStats against the mongos of a sharded cluster, it will collect indexStats results across all primaries in the cluster:

      [direct: mongos] test0> db.coll0.aggregate( [ { $indexStats: { } } ] )

      [ { name: 'index0', host: 'primary0:123', shard: 'shard0', ... }, { name: 'index1', host: 'primary1:123', shard: 'shard1', ...}, ... ] 

      This is not desirable since it leaves out critical information about index usage in secondary nodes.

      It would greatly benefit InTel team to be able to easily get all the index stats info from an entire cluster using a single command... currently we're forced to iterate over every node in the cluster and collect the info ourself.

      Acceptance Criteria

      1. When I run $indexStats on mongos of a sharded cluster, I see index stats from every node in the cluster (including secondaries)
      2. When I run $indexStats on primary of a shard, I see index stats from every node in the shard

            Assignee:
            Unassigned Unassigned
            Reporter:
            david.jahn@mongodb.com David Jahn
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: