-
Type: Improvement
-
Resolution: Unresolved
-
Priority: 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
- When I run $indexStats on mongos of a sharded cluster, I see index stats from every node in the cluster (including secondaries)
- When I run $indexStats on primary of a shard, I see index stats from every node in the shard