[COMPASS-3070] Index usage shows zero for every index if the user can't run aggregate command Created: 17/Aug/18  Updated: 29/Oct/23  Resolved: 07/Mar/19

Status: Closed
Project: Compass
Component/s: Compass
Affects Version/s: 1.14.6
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Andrew Ryder (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If the connected user has the ability to view index definitions but not the ability to run aggregate command, the index stats page will show usage as zero for every index, without any indication that stats couldn't be retrieved.

This is bad because typically we advise people to look for indexes with zero usage as candidates for deletion.



 Comments   
Comment by Massimiliano Marcon [ 07/Mar/19 ]

I am closing this as I just tried it and it worked fine for me (tested with 1.18-beta). I had 0 in index usage for _id, I built an aggregation with the following match stage

[{$match: {
  _id: ObjectId('5bd3098bc4b7b2bcce104f20')
}}]

and the index usage was update (after refreshing with Cmd+R)

Generated at Wed Feb 07 22:32:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.