From 93dda51140446d51c5be01aafd2cc8fecb7eff31 Mon Sep 17 00:00:00 2001 From: Randolph Tan Date: Thu, 1 May 2014 15:08:31 -0400 Subject: SERVER-13587 ndeleted in system.profile documents reports 1 too few documents removed (cherry picked from commit 6c2cfda2d60f0fda51bb389449b7defff9704b73) --- src/mongo/db/commands/write_commands/batch_executor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mongo/db/commands/write_commands/batch_executor.cpp b/src/mongo/db/commands/write_commands/batch_executor.cpp index 1d86f1e87d0..42290171676 100644 --- a/src/mongo/db/commands/write_commands/batch_executor.cpp +++ b/src/mongo/db/commands/write_commands/batch_executor.cpp @@ -512,11 +512,13 @@ namespace mongo { currentOp->setQuery( currWrite.getUpdate()->getQuery() ); currentOp->debug().query = currWrite.getUpdate()->getQuery(); currentOp->debug().updateobj = currWrite.getUpdate()->getUpdateExpr(); + // Note: debug().nMatched, nModified and nmoved are set internally in update } else { dassert( currWrite.getOpType() == BatchedCommandRequest::BatchType_Delete ); currentOp->setQuery( currWrite.getDelete()->getQuery() ); currentOp->debug().query = currWrite.getDelete()->getQuery(); + currentOp->debug().ndeleted = 0; } return currentOp.release(); -- cgit v1.2.1