summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/migration_chunk_cloner_source_legacy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/migration_chunk_cloner_source_legacy.h')
-rw-r--r--src/mongo/db/s/migration_chunk_cloner_source_legacy.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy.h b/src/mongo/db/s/migration_chunk_cloner_source_legacy.h
index c072718475a..72d299b58e4 100644
--- a/src/mongo/db/s/migration_chunk_cloner_source_legacy.h
+++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy.h
@@ -37,6 +37,7 @@
#include "mongo/db/query/plan_executor.h"
#include "mongo/db/s/migration_chunk_cloner_source.h"
#include "mongo/db/s/migration_session_id.h"
+#include "mongo/db/s/session_catalog_migration_source.h"
#include "mongo/s/move_chunk_request.h"
#include "mongo/s/shard_key_pattern.h"
#include "mongo/stdx/memory.h"
@@ -72,11 +73,19 @@ public:
bool isDocumentInMigratingChunk(const BSONObj& doc) override;
- void onInsertOp(OperationContext* opCtx, const BSONObj& insertedDoc) override;
+ void onInsertOp(OperationContext* opCtx,
+ const BSONObj& insertedDoc,
+ const Timestamp& oplogTs) override;
- void onUpdateOp(OperationContext* opCtx, const BSONObj& updatedDoc) override;
+ void onUpdateOp(OperationContext* opCtx,
+ const BSONObj& updatedDoc,
+ const Timestamp& oplogTs,
+ const Timestamp& prePostImageTs) override;
- void onDeleteOp(OperationContext* opCtx, const BSONObj& deletedDocId) override;
+ void onDeleteOp(OperationContext* opCtx,
+ const BSONObj& deletedDocId,
+ const Timestamp& oplogTs,
+ const Timestamp& preImageTs) override;
// Legacy cloner specific functionality
@@ -121,6 +130,8 @@ public:
*/
Status nextModsBatch(OperationContext* opCtx, Database* db, BSONObjBuilder* builder);
+ void nextSessionMigrationBatch(OperationContext* opCtx, BSONArrayBuilder* arrBuilder);
+
private:
friend class DeleteNotificationStage;
friend class LogOpForShardingHandler;
@@ -183,6 +194,8 @@ private:
// during the cloning stage
std::unique_ptr<PlanExecutor, PlanExecutor::Deleter> _deleteNotifyExec;
+ SessionCatalogMigrationSource _sessionCatalogSource;
+
// Protects the entries below
stdx::mutex _mutex;