-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.4.5
-
Component/s: Index Maintenance
-
None
-
ALL
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
[ed: original title was "Index shown in getIndexes() does not actually exist"]
I've been trying to track down a mysterious performance issue on one of our shards for a little while, and it turns out the culprit is an index that doesn't actually exist:
events2:PRIMARY> db.listen.getIndexes();
[
{
"v" : 1,
"key" : {
"_id" : 1
},
"ns" : "site_events.listen",
"name" : "_id_"
},
{
"v" : 1,
"key" : {
"uid" : 1
},
"ns" : "site_events.listen",
"name" : "uid_1"
},
{
"v" : 1,
"key" : {
"list.i" : 1 // list.i, okay
},
"ns" : "site_events.listen",
"name" : "list.i_1",
"background" : true
}
]
events2:PRIMARY>
events2:PRIMARY> db.listen.stats();
{
"ns" : "site_events.listen",
"count" : 616369,
"size" : 7789669296,
"avgObjSize" : 12637.996550767479,
"storageSize" : 9305386992,
"numExtents" : 24,
"nindexes" : 2,
"lastExtentSize" : 2146426864,
"paddingFactor" : 1.0000000000920757,
"systemFlags" : 1,
"userFlags" : 1,
"totalIndexSize" : 45098816,
"indexSizes" : { // no list.i here!
"_id_" : 22026144,
"uid_1" : 23072672
},
"ok" : 1
}
Queries that should use this index do a full scan instead.
- is related to
-
SERVER-11391 repairDatabase should be disallowed on secondaries
-
- Closed
-
- related to
-
SERVER-2771 Background index builds on replica set secondaries
-
- Closed
-