|
I confirmed this issue by generating the following example log lines:
2018-02-27T11:27:04.145-0500 I WRITE [conn1] remove test.c query: { $or: [ { _id: 1.0 }, { _id: 2.0 } ] } ndeleted:2 keyUpdates:0 writeConflicts:0 numYields:1 locks:{ Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 2 } }, Collection: { acquireCount: { w: 2 } } } 0ms
|
2018-02-27T11:27:04.145-0500 I COMMAND [conn1] command test.$cmd command: delete { delete: "c", deletes: [ { q: { $or: [ { _id: 1.0 }, { _id: 2.0 } ] }, limit: 0.0 } ], ordered: true } keyUpdates:0 writeConflicts:0 numYields:0 reslen:25 locks:{ Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 2 } }, Collection: { acquireCount: { w: 2 } } } protocol:op_command 0ms
|
This is a write batch consisting of a single multi-delete. We generate a log line for each statement in the batch, as well as a log line for the entire write command. You'll notice that the former log line reports a yield, but the latter includes the misleading string "numYields:0". This is a reporting bug; the server should probably just omit numYields for the log line in the COMMAND component. I suspect we can fix this by modifying the outer CurOp to indicate that it has no numYields value.
|