diff options
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/repl/oplog.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp index 07769c660db..0075413c560 100644 --- a/src/mongo/db/repl/oplog.cpp +++ b/src/mongo/db/repl/oplog.cpp @@ -1025,6 +1025,15 @@ Status applyOperation_inlock(OperationContext* opCtx, // operation type -- see logOp() comments for types const char* opType = fieldOp.valuestrsafe(); + if (*opType == 'n') { + // no op + if (incrementOpsAppliedStats) { + incrementOpsAppliedStats(); + } + + return Status::OK(); + } + NamespaceString requestNss; Collection* collection = nullptr; if (fieldUI) { @@ -1416,11 +1425,6 @@ Status applyOperation_inlock(OperationContext* opCtx, if (incrementOpsAppliedStats) { incrementOpsAppliedStats(); } - } else if (*opType == 'n') { - // no op - if (incrementOpsAppliedStats) { - incrementOpsAppliedStats(); - } } else { invariant(*opType != 'c'); // commands are processed in applyCommand_inlock() uasserted(14825, str::stream() << "error in applyOperation : unknown opType " << *opType); |