diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-09-28 14:05:36 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-09-29 14:31:59 -0400 |
commit | ba3dc420fe41f9c6ba718da5eb270161374839f3 (patch) | |
tree | d8eb3e68dd62bbc2bb0b982945a62e7d892e37b4 /src/mongo/db/s/migration_destination_manager.h | |
parent | fd94476eb6ca0207dd69662d36f93eeaaa227073 (diff) | |
download | mongo-ba3dc420fe41f9c6ba718da5eb270161374839f3.tar.gz |
SERVER-26370 Register incoming migrations on the ActiveMigrationsRegistry
In order to avoid race conditions where a shard could serve both as a
donor and recipient.
Diffstat (limited to 'src/mongo/db/s/migration_destination_manager.h')
-rw-r--r-- | src/mongo/db/s/migration_destination_manager.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/s/migration_destination_manager.h b/src/mongo/db/s/migration_destination_manager.h index 804ec2bf35a..0b16202d55e 100644 --- a/src/mongo/db/s/migration_destination_manager.h +++ b/src/mongo/db/s/migration_destination_manager.h @@ -36,6 +36,7 @@ #include "mongo/bson/oid.h" #include "mongo/client/connection_string.h" #include "mongo/db/namespace_string.h" +#include "mongo/db/s/active_migrations_registry.h" #include "mongo/db/s/migration_session_id.h" #include "mongo/s/shard_id.h" #include "mongo/stdx/condition_variable.h" @@ -88,6 +89,7 @@ public: * Returns OK if migration started successfully. */ Status start(const NamespaceString& nss, + ScopedRegisterReceiveChunk scopedRegisterReceiveChunk, const MigrationSessionId& sessionId, const ConnectionString& fromShardConnString, const ShardId& fromShard, @@ -193,6 +195,7 @@ private: // Migration session ID uniquely identifies the migration and indicates whether the prepare // method has been called. boost::optional<MigrationSessionId> _sessionId; + boost::optional<ScopedRegisterReceiveChunk> _scopedRegisterReceiveChunk; // A condition variable on which to wait for the prepare method to be called. stdx::condition_variable _isActiveCV; |