[COMPASS-3697] Index utilisation inaccuracies and untrusted values Created: 14/Jun/19  Updated: 28/Jun/23

Status: Open
Project: Compass
Component/s: Indexes
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Enrique Garnelo Prediger Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Story Points: 3

 Description   

Compass version: 1.18

Issue description
This was brought up in a support case (linked) with a customer that when connected to a cluster through the mongos saw that index utilisation was displayed as 0.
Due to this they decided to delete the index causing issues in their production environment as, in fact, the application was using the index.

The misleading values are due to an expected behaviour on the server described in HELP-7444 that is also aggravated in Compass as the source for the displayed value is not being expose.

Quick fix
Add an additional column to the Index summary table stating from what process the result came from. When running through the shell when connected to a mongos I get:

mongos> db.bar.aggregate([{ $indexStats: { } } ] ).pretty()
{
	"name" : "a_1",
	"key" : {
		"a" : 1
	},
	"host" : "enriquemac:27021",
	"accesses" : {
		"ops" : NumberLong(1),
		"since" : ISODate("2019-06-14T11:05:34.637Z")
	}
}
{
	"name" : "_id_",
	"key" : {
		"_id" : 1
	},
	"host" : "enriquemac:27021",
	"accesses" : {
		"ops" : NumberLong(0),
		"since" : ISODate("2019-06-14T11:00:41.252Z")
	}
}

Definite fix
Leverage the functionality of SERVER-20509 when implemented.



 Comments   
Comment by Yiru Gao [ 28/Jun/23 ]

Happened to me as well, though I observe sometimes usage number can be lower just by click refresh.

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