summaryrefslogtreecommitdiff
path: root/src/mongo/db/op_observer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/op_observer.h')
-rw-r--r--src/mongo/db/op_observer.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mongo/db/op_observer.h b/src/mongo/db/op_observer.h
index 36dafda30c6..e9c18f4bbe7 100644
--- a/src/mongo/db/op_observer.h
+++ b/src/mongo/db/op_observer.h
@@ -51,6 +51,12 @@ class OpObserver {
public:
OpObserver() {}
~OpObserver() {}
+
+ struct DeleteState {
+ BSONObj idDoc;
+ bool isMigrating = false;
+ };
+
void onCreateIndex(OperationContext* txn,
const std::string& ns,
BSONObj indexDoc,
@@ -61,9 +67,10 @@ public:
std::vector<BSONObj>::const_iterator end,
bool fromMigrate = false);
void onUpdate(OperationContext* txn, oplogUpdateEntryArgs args);
+ DeleteState aboutToDelete(OperationContext* txn, const NamespaceString& ns, const BSONObj& doc);
void onDelete(OperationContext* txn,
- const std::string& ns,
- const BSONObj& idDoc,
+ const NamespaceString& ns,
+ DeleteState deleteState,
bool fromMigrate = false);
void onOpMessage(OperationContext* txn, const BSONObj& msgObj);
void onCreateCollection(OperationContext* txn,