diff options
| author | Wenbin Zhu <wenbin.zhu@mongodb.com> | 2023-02-24 20:54:37 +0000 |
|---|---|---|
| committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-02-25 04:19:34 +0000 |
| commit | 3a6478a700f1995cdb16ed434a6e124b8567bf60 (patch) | |
| tree | e2e2c60c8cdda1788b759bc22d4a35003eb8879d /src/mongo/db/repl/oplog_applier_impl.cpp | |
| parent | 8a53ac6194cbd298e517fc4102263facf9f66ede (diff) | |
| download | mongo-3a6478a700f1995cdb16ed434a6e124b8567bf60.tar.gz | |
SERVER-73118 Implement split prepare/commit/abort oplog application on secondary.
Diffstat (limited to 'src/mongo/db/repl/oplog_applier_impl.cpp')
| -rw-r--r-- | src/mongo/db/repl/oplog_applier_impl.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/db/repl/oplog_applier_impl.cpp b/src/mongo/db/repl/oplog_applier_impl.cpp index a294d725202..0e2b669304b 100644 --- a/src/mongo/db/repl/oplog_applier_impl.cpp +++ b/src/mongo/db/repl/oplog_applier_impl.cpp @@ -98,7 +98,7 @@ Status finishAndLogApply(OperationContext* opCtx, logv2::DynamicAttributes attrs; auto redacted = redact(entryOrGroupedInserts.toBSON()); - if (entryOrGroupedInserts.getOp().getOpType() == OpTypeEnum::kCommand) { + if (entryOrGroupedInserts.getOp()->getOpType() == OpTypeEnum::kCommand) { attrs.add("command", redacted); } else { attrs.add("CRUD", redacted); @@ -576,7 +576,6 @@ StatusWith<OpTime> OplogApplierImpl::_applyOplogBatch(OperationContext* opCtx, } { - std::vector<Status> statusVector(_writerPool->getStats().options.maxThreads, Status::OK()); // Doles out all the work to the writer pool threads. writerVectors is not modified, @@ -902,16 +901,16 @@ Status applyOplogEntryOrGroupedInserts(OperationContext* opCtx, &replOpCounters); auto op = entryOrGroupedInserts.getOp(); - if (op.getOpType() == OpTypeEnum::kNoop) { + if (op->getOpType() == OpTypeEnum::kNoop) { // No-ops should never fail application, since there's nothing to do. invariant(status.isOK()); - auto opObj = op.getObject(); + auto opObj = op->getObject(); if (opObj.hasField(ReplicationCoordinator::newPrimaryMsgField) && opObj.getField(ReplicationCoordinator::newPrimaryMsgField).str() == ReplicationCoordinator::newPrimaryMsg) { - ReplicationMetrics::get(opCtx).setParticipantNewTermDates(op.getWallClockTime(), + ReplicationMetrics::get(opCtx).setParticipantNewTermDates(op->getWallClockTime(), applyStartTime); } |
