|
Example of bulk write logging post SERVER-23128:
Bulk Insert of 2 Documents
2016-05-16T12:30:00.106-0400 I COMMAND [conn1] command test.test command: insert { insert: "test", documents: 2, ordered: true } ninserted:2 keysInserted:2 numYields:0 reslen:29 locks:{ Global: { acquireCount: { r: 1, w: 1 } }, Database: { acquireCount: { w: 1 } }, Collection: { acquireCount: { w: 1 } } } protocol:op_command 1ms
|
Bulk Update of 2 Documents
2016-05-16T12:31:46.388-0400 I WRITE [conn1] update test.test query: { a: 1.0 } planSummary: COLLSCAN update: { $inc: { c: 3.0 } } keysExamined:0 docsExamined:2 nMatched:1 nModified:1 numYields:0 locks:{ Global: { acquireCount: { r: 1, w: 1 } }, Database: { acquireCount: { w: 1 } }, Collection: { acquireCount: { w: 1 } } } 2ms
|
2016-05-16T12:31:46.388-0400 I WRITE [conn1] update test.test query: { a: 2.0 } planSummary: COLLSCAN update: { $inc: { c: 1.0 } } keysExamined:0 docsExamined:3 nMatched:0 nModified:0 numYields:0 locks:{ Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 2 } }, Collection: { acquireCount: { w: 2 } } } 0ms
|
2016-05-16T12:31:46.388-0400 I COMMAND [conn1] command test.$cmd command: update { update: "test", updates: 2, ordered: true } numYields:0 reslen:44 locks:{ Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 2 } }, Collection: { acquireCount: { w: 2 } } } protocol:op_command 3ms
|
Bulk Removal of 2 Documents
2016-05-16T12:35:24.989-0400 I WRITE [conn1] remove test.test query: { a: 1.0 } planSummary: COLLSCAN keysExamined:0 docsExamined:2 ndeleted:1 keysDeleted:1 numYields:0 locks:{ Global: { acquireCount: { r: 1, w: 1 } }, Database: { acquireCount: { w: 1 } }, Collection: { acquireCount: { w: 1 } } } 1ms
|
2016-05-16T12:35:24.989-0400 I WRITE [conn1] remove test.test query: { a: 1.0 } planSummary: COLLSCAN keysExamined:0 docsExamined:2 ndeleted:1 keysDeleted:1 numYields:0 locks:{ Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 2 } }, Collection: { acquireCount: { w: 2 } } } 0ms
|
2016-05-16T12:35:24.989-0400 I COMMAND [conn1] command test.$cmd command: delete { delete: "test", deletes: 2, ordered: true } numYields:0 reslen:29 locks:{ Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 2 } }, Collection: { acquireCount: { w: 2 } } } protocol:op_command 2ms
|
Review of log, profiler and currentOp() output for the above shows:
| Operation |
Individual Logged |
Batch Logged |
Individual in Profiler |
Batch in Profiler |
Individual in CurrentOp |
Batch in CurrentOp |
| Insert |
No |
Yes |
No |
Yes |
No |
Yes |
| Update |
Yes |
Yes |
Yes |
No |
Yes |
No |
| Remove |
Yes |
Yes |
Yes |
No |
Yes |
No |
|