summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/oplog_applier_impl.cpp
diff options
context:
space:
mode:
authorDaniel Gottlieb <daniel.gottlieb@mongodb.com>2023-01-09 22:14:13 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-01-10 04:24:36 +0000
commit23acbaa87ef1cbf9e2136c0ad63c32efd0c39bd4 (patch)
tree3dc35457544dcc3f454194a76c222c529a9c0b77 /src/mongo/db/repl/oplog_applier_impl.cpp
parentbc7e2f3f5a4d7825b67f81443c06f1da49e92c55 (diff)
downloadmongo-23acbaa87ef1cbf9e2136c0ad63c32efd0c39bd4.tar.gz
SERVER-72500: Change oplog application to work on batches of ApplierOperations instead of OplogEntrys.
ApplierOperations in the general case decays to an OplogEntry. But they can also encapsulate states pertaining to prepared transactions.
Diffstat (limited to 'src/mongo/db/repl/oplog_applier_impl.cpp')
-rw-r--r--src/mongo/db/repl/oplog_applier_impl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/repl/oplog_applier_impl.cpp b/src/mongo/db/repl/oplog_applier_impl.cpp
index 6d4818d5ac7..7f41a03865d 100644
--- a/src/mongo/db/repl/oplog_applier_impl.cpp
+++ b/src/mongo/db/repl/oplog_applier_impl.cpp
@@ -116,7 +116,7 @@ void _addOplogChainOpsToWriterVectors(OperationContext* opCtx,
std::vector<std::vector<OplogEntry>>* derivedOps,
OplogEntry* op,
CachedCollectionProperties* collPropertiesCache,
- std::vector<std::vector<const OplogEntry*>>* writerVectors) {
+ std::vector<std::vector<ApplierOperation>>* writerVectors) {
std::vector<OplogEntry> txnOps;
bool shouldSerialize = false;
std::tie(txnOps, shouldSerialize) =
@@ -544,7 +544,7 @@ StatusWith<OpTime> OplogApplierImpl::_applyOplogBatch(OperationContext* opCtx,
// and create a pseudo oplog.
std::vector<std::vector<OplogEntry>> derivedOps;
- std::vector<std::vector<const OplogEntry*>> writerVectors(
+ std::vector<std::vector<ApplierOperation>> writerVectors(
_writerPool->getStats().options.maxThreads);
fillWriterVectors(opCtx, &ops, &writerVectors, &derivedOps);
@@ -685,7 +685,7 @@ StatusWith<OpTime> OplogApplierImpl::_applyOplogBatch(OperationContext* opCtx,
void OplogApplierImpl::_deriveOpsAndFillWriterVectors(
OperationContext* opCtx,
std::vector<OplogEntry>* ops,
- std::vector<std::vector<const OplogEntry*>>* writerVectors,
+ std::vector<std::vector<ApplierOperation>>* writerVectors,
std::vector<std::vector<OplogEntry>>* derivedOps,
SessionUpdateTracker* sessionUpdateTracker) noexcept {
@@ -785,7 +785,7 @@ void OplogApplierImpl::_deriveOpsAndFillWriterVectors(
void OplogApplierImpl::fillWriterVectors(
OperationContext* opCtx,
std::vector<OplogEntry>* ops,
- std::vector<std::vector<const OplogEntry*>>* writerVectors,
+ std::vector<std::vector<ApplierOperation>>* writerVectors,
std::vector<std::vector<OplogEntry>>* derivedOps) noexcept {
SessionUpdateTracker sessionUpdateTracker;
@@ -802,7 +802,7 @@ void OplogApplierImpl::fillWriterVectors(
void OplogApplierImpl::fillWriterVectors_forTest(
OperationContext* opCtx,
std::vector<OplogEntry>* ops,
- std::vector<std::vector<const OplogEntry*>>* writerVectors,
+ std::vector<std::vector<ApplierOperation>>* writerVectors,
std::vector<std::vector<OplogEntry>>* derivedOps) noexcept {
fillWriterVectors(opCtx, ops, writerVectors, derivedOps);
}
@@ -858,7 +858,7 @@ Status applyOplogEntryOrGroupedInserts(OperationContext* opCtx,
}
Status OplogApplierImpl::applyOplogBatchPerWorker(OperationContext* opCtx,
- std::vector<const OplogEntry*>* ops,
+ std::vector<ApplierOperation>* ops,
WorkerMultikeyPathInfo* workerMultikeyPathInfo,
const bool isDataConsistent) {
UnreplicatedWritesBlock uwb(opCtx);