summaryrefslogtreecommitdiff
path: root/src/mongo/db/op_observer.h
diff options
context:
space:
mode:
authorDianna Hohensee <dianna.hohensee@10gen.com>2015-12-02 11:51:41 -0500
committerDianna Hohensee <dianna.hohensee@10gen.com>2015-12-22 09:12:08 -0500
commit3663e004dfc2f73b82b3d88b5fa1ac6b7dcd1d33 (patch)
treed46813559c37225f31768042e2bd2a4ba8ce1ba0 /src/mongo/db/op_observer.h
parent07b2e02ffddbd9998b8c738895f3fae85b592176 (diff)
downloadmongo-3663e004dfc2f73b82b3d88b5fa1ac6b7dcd1d33.tar.gz
SERVER-21382 fixing sharding migration to transfer only document deletions relevant to the chunk being migrated, not every deletion
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,