summaryrefslogtreecommitdiff
path: root/src/mongo/db/op_observer_registry.h
diff options
context:
space:
mode:
authorJonathan Reams <jbreams@mongodb.com>2020-02-10 10:14:32 +0100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-10 13:08:24 +0000
commit6c9c0b19d5980f065e1ff2ad624bb8d18bb88fe5 (patch)
tree678fca12abb4d786006bac635c430f806bb0ab13 /src/mongo/db/op_observer_registry.h
parent43c2b5b172cf6783319944c0d6931478db01eefa (diff)
downloadmongo-6c9c0b19d5980f065e1ff2ad624bb8d18bb88fe5.tar.gz
SERVER-45806 Record pre-images on updates and deletes when recordPreImage is enabled
Diffstat (limited to 'src/mongo/db/op_observer_registry.h')
-rw-r--r--src/mongo/db/op_observer_registry.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mongo/db/op_observer_registry.h b/src/mongo/db/op_observer_registry.h
index 8da173e1c91..2470baa74cc 100644
--- a/src/mongo/db/op_observer_registry.h
+++ b/src/mongo/db/op_observer_registry.h
@@ -268,11 +268,12 @@ public:
o->onEmptyCapped(opCtx, collectionName, uuid);
}
- void onUnpreparedTransactionCommit(
- OperationContext* opCtx, const std::vector<repl::ReplOperation>& statements) override {
+ void onUnpreparedTransactionCommit(OperationContext* opCtx,
+ std::vector<repl::ReplOperation>* statements,
+ size_t numberOfPreImagesToWrite) override {
ReservedTimes times{opCtx};
for (auto& o : _observers)
- o->onUnpreparedTransactionCommit(opCtx, statements);
+ o->onUnpreparedTransactionCommit(opCtx, statements, numberOfPreImagesToWrite);
}
void onPreparedTransactionCommit(
@@ -288,10 +289,12 @@ public:
void onTransactionPrepare(OperationContext* opCtx,
const std::vector<OplogSlot>& reservedSlots,
- std::vector<repl::ReplOperation>& statements) override {
+ std::vector<repl::ReplOperation>* statements,
+ size_t numberOfPreImagesToWrite) override {
ReservedTimes times{opCtx};
for (auto& observer : _observers) {
- observer->onTransactionPrepare(opCtx, reservedSlots, statements);
+ observer->onTransactionPrepare(
+ opCtx, reservedSlots, statements, numberOfPreImagesToWrite);
}
}