我为某些项目应用了appName,但是在currentOp中,某些查询缺少了它。多数情况下,计数查询缺少它。
{
"desc" : "conn1786739",
"threadId" : "140671499200256",
"connectionId" : 1786739,
"client" : "179.22.4.3:42354",
"active" : true,
"opid" : -1076773120,
"secs_running" : 6,
"microsecs_running" : NumberLong(6928801),
"op" : "command",
"ns" : "dbname.members",
"query" : {
"count" : "memebers",
"query" : {
"$or" : [
{
"$and" : [
{
"condition1" : {
"$gt" : 0
}
},
{
"condition1" : 0
},
]
}
],
},
"readConcern" : {
}
},
"numYields" : 28,
"locks" : {
"Global" : "r",
"Database" : "r",
"Collection" : "r"
},
"waitingForLock" : false,
}
我在currentOp中看到了以上结果,即使appName被设置为查询,某些查询也没有出现。