运行getLastError命令可以帮助我们获取反馈信息
db.count.update({"x":3},{$inc:{"x":2}},false,true) db.runCommand({getLastError:1}) { "connectionId" : 199, "updatedExisting" : true, "n" : 1, "syncMillis" : 0, "writtenTo" : null, "err" : null, "ok" : 1 }
db.count.update({"x":3},{$inc:{"x":2}},false,true) db.runCommand({getLastError:1}) { "connectionId" : 199, "updatedExisting" : true, "n" : 1, "syncMillis" : 0, "writtenTo" : null, "err" : null, "ok" : 1 }