Skip to content

Commit

Permalink
SERVER-32106 Don't lookup collection from catalog when applying optyp…
Browse files Browse the repository at this point in the history
…e 'n' oplog entries in secondaries
  • Loading branch information
renctan committed Nov 30, 2017
1 parent 2cc9396 commit dbb028a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/mongo/db/repl/oplog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -1408,11 +1417,6 @@ Status applyOperation_inlock(OperationContext* opCtx,
wuow.commit();
});

if (incrementOpsAppliedStats) {
incrementOpsAppliedStats();
}
} else if (*opType == 'n') {
// no op
if (incrementOpsAppliedStats) {
incrementOpsAppliedStats();
}
Expand Down

0 comments on commit dbb028a

Please sign in to comment.