-
Type:
Bug
-
Resolution: Incomplete
-
Priority:
Major - P3
-
None
-
Affects Version/s: 3.0.5
-
Component/s: Index Maintenance, Performance
-
None
-
ALL
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Randomly the query (slave or master) stop to use an index and start to scan the collection.
Here is an extract of the db.currentOp:
{
"desc" : "conn206",
"threadId" : "0x65818e0",
"connectionId" : 206,
"opid" : 38888384,
"active" : true,
"secs_running" : 131,
"microsecs_running" : NumberLong(131062659),
"op" : "query",
"ns" : "prod.cart",
"query" : {
"orderby" : {
"_id" : 1
},
"$query" : {
"offer" : "OFFER1",
"code" : "CODE2",
"customerId" : ObjectId("55c82exxxxxxxxxxx")
}
},
"planSummary" : "IXSCAN { code: 1 }, IXSCAN { code: 1 }",
"client" : "172.x.x.x:52977",
"numYields" : 6191,
"locks" : {
"Global" : "r",
"MMAPV1Journal" : "r",
"Database" : "r",
"Collection" : "R"
},
"waitingForLock" : false,
"lockStats" : {
"Global" : {
"acquireCount" : {
"r" : NumberLong(12384)
},
"acquireWaitCount" : {
"r" : NumberLong(831)
},
"timeAcquiringMicros" : {
"r" : NumberLong(7836539)
}
},
"MMAPV1Journal" : {
"acquireCount" : {
"r" : NumberLong(6192)
},
"acquireWaitCount" : {
"r" : NumberLong(27)
},
"timeAcquiringMicros" : {
"r" : NumberLong(204897)
}
},
"Database" : {
"acquireCount" : {
"r" : NumberLong(6192)
}
},
"Collection" : {
"acquireCount" : {
"R" : NumberLong(6192)
}
}
}
}
Index:
[
{
"v" : 1,
"key" : {
"_id" : 1
},
"name" : "_id_",
"ns" : "prod.Cart"
},
{
"v" : 1,
"key" : {
"customerId" : 1
},
"name" : "customerId_1",
"ns" : "prod.Cart"
},
{
"v" : 1,
"key" : {
"code" : 1
},
"name" : "code_1",
"ns" : "prod.Cart"
},
{
"v" : 1,
"key" : {
"offer" : 1
},
"name" : "offer_1",
"ns" : "prod.Cart",
"background" : true
}
]