diff options
author | Randolph Tan <randolph@10gen.com> | 2017-09-28 16:33:27 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2017-09-28 16:51:00 -0400 |
commit | f88f6f43b7ae2af0286437da8f00c0079ed99145 (patch) | |
tree | ec22edf29d746877baa697f80bc10d0b40ebb616 /src/mongo/db/s/migration_chunk_cloner_source_legacy.h | |
parent | 0309fa8091bdf7d6663a02fefd5d61ae0965e7b1 (diff) | |
download | mongo-f88f6f43b7ae2af0286437da8f00c0079ed99145.tar.gz |
SERVER-30894/SERVER-31290 Implement command for transferring session information during migration
This reverts commit f24fbb0011c6ded9101f08574e7cd07e63690a9b.
This reverts commit d293f6857bcb36b26ca8fa03d90299714fe060de.
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.h | 19 |
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; |