summaryrefslogtreecommitdiff
path: root/src/mongo/idl
diff options
context:
space:
mode:
authorMatt Kneiser <matt.kneiser@mongodb.com>2023-04-24 10:39:35 -0700
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-04-24 18:53:51 +0000
commitdf2b4fa0a434e7f24969f4fa67575b411282a796 (patch)
tree85f03ff046fecdcac4b42fef5ee99541b6896706 /src/mongo/idl
parentab76fd41a4dba99f711baa064ceb452045e3e5c6 (diff)
downloadmongo-df2b4fa0a434e7f24969f4fa67575b411282a796.tar.gz
SERVER-76369 Accumulate state among early OpObservers
Diffstat (limited to 'src/mongo/idl')
-rw-r--r--src/mongo/idl/cluster_server_parameter_op_observer.cpp6
-rw-r--r--src/mongo/idl/cluster_server_parameter_op_observer.h7
2 files changed, 9 insertions, 4 deletions
diff --git a/src/mongo/idl/cluster_server_parameter_op_observer.cpp b/src/mongo/idl/cluster_server_parameter_op_observer.cpp
index 7ecdc6a9748..6d0e3d37e5f 100644
--- a/src/mongo/idl/cluster_server_parameter_op_observer.cpp
+++ b/src/mongo/idl/cluster_server_parameter_op_observer.cpp
@@ -74,7 +74,8 @@ void ClusterServerParameterOpObserver::onInserts(OperationContext* opCtx,
}
void ClusterServerParameterOpObserver::onUpdate(OperationContext* opCtx,
- const OplogUpdateEntryArgs& args) {
+ const OplogUpdateEntryArgs& args,
+ OpStateAccumulator* opAccumulator) {
auto updatedDoc = args.updateArgs->updatedDoc;
if (!isConfigNamespace(args.coll->ns()) || args.updateArgs->update.isEmpty()) {
return;
@@ -117,7 +118,8 @@ void ClusterServerParameterOpObserver::aboutToDelete(OperationContext* opCtx,
void ClusterServerParameterOpObserver::onDelete(OperationContext* opCtx,
const CollectionPtr& coll,
StmtId stmtId,
- const OplogDeleteEntryArgs& args) {
+ const OplogDeleteEntryArgs& args,
+ OpStateAccumulator* opAccumulator) {
const auto& docName = aboutToDeleteDoc(opCtx);
if (!docName.empty()) {
opCtx->recoveryUnit()->onCommit([docName, tenantId = tenantIdToDelete(opCtx)](
diff --git a/src/mongo/idl/cluster_server_parameter_op_observer.h b/src/mongo/idl/cluster_server_parameter_op_observer.h
index a06f4dbde17..dedf7fcbb2c 100644
--- a/src/mongo/idl/cluster_server_parameter_op_observer.h
+++ b/src/mongo/idl/cluster_server_parameter_op_observer.h
@@ -63,14 +63,17 @@ public:
const UUID& globalIndexUuid,
const BSONObj& key,
const BSONObj& docKey) final {}
- void onUpdate(OperationContext* opCtx, const OplogUpdateEntryArgs& args) final;
+ void onUpdate(OperationContext* opCtx,
+ const OplogUpdateEntryArgs& args,
+ OpStateAccumulator* opAccumulator = nullptr) final;
void aboutToDelete(OperationContext* opCtx,
const CollectionPtr& coll,
const BSONObj& doc) final;
void onDelete(OperationContext* opCtx,
const CollectionPtr& coll,
StmtId stmtId,
- const OplogDeleteEntryArgs& args) final;
+ const OplogDeleteEntryArgs& args,
+ OpStateAccumulator* opAccumulator = nullptr) final;
void onDropDatabase(OperationContext* opCtx, const DatabaseName& dbName) final;
using OpObserver::onDropCollection;
repl::OpTime onDropCollection(OperationContext* opCtx,