我在mongodb命令行运行db.currentOp(),返回结果中出现"op" : "getmore",,请问一下getmore是一个什么操作?而且特别耗时:
>db.currentOp()
{
"inprog" : [
{
"opid" : 821006778,
"active" : true,
"secs_running" : 0,
"microsecs_running" : NumberLong(252939),
"op" : "getmore",
"ns" : "local.oplog.$main",
"query" : {
},
"client" : "10.171.53.62:34632",
"desc" : "conn9912",
"threadId" : "0x7f9665e39700",
"connectionId" : 9912,
"waitingForLock" : false,
"numYields" : 0,
"lockStats" : {
"timeLockedMicros" : {
"r" : NumberLong(14),
"w" : NumberLong(0)
},
"timeAcquiringMicros" : {
"r" : NumberLong(1),
"w" : NumberLong(0)
}
}
}
]
}
PHP中文网2017-05-02 09:24:35
Getmore retrieves data from the cursor. If you encounter problems, you can ask Google first. Then you must first learn to circumvent the firewall...
The more data you have, the more time it takes. This is normal. The data you provide is the system pulling data from the oplog and distributing it to the slave node. It seems to be master/slave replication.
The oplog table is a relatively large table by default without indexes, so the first traversal will take a long time.