以下是db.currentOp()
的摘录:
{
"opid" : 71144,
"active" : false,
"op" : "query",
"client" : "127.0.0.1:41889",
"desc" : "conn2",
"threadId" : "0x7fc3e4b4d700",
"connectionId" : 2,
"locks" : {
"^pophealth-production" : "W"
},
"waitingForLock" : true,
"numYields" : 0,
},
{
"opid" : 70981,
"active" : true,
"secs_running" : 2647,
"op" : "query",
"ns" : "pophealth-production.records",
"query" : {
"$msg" : "query not recording (too large)"
},
"client" : "127.0.0.1:41890",
"desc" : "conn3",
"threadId" : "0x7fc3e4a4c700",
"connectionId" : 3,
"locks" : {
"^" : "r",
"^pophealth-production" : "R"
},
"waitingForLock" : false,
"numYields" : 5,
一个线程如何持有写锁定但另一个线程持有读锁定怎么可能?不应该写锁定会阻止读锁定吗?或active: false
标志是否意味着第一个进程实际上没有锁定?