diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-11-29 10:21:19 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-12-04 13:24:55 -0500 |
commit | 95e95613412c33b52bb8a514751550c2447526d4 (patch) | |
tree | b0f86dd04b6c6f8978b6a77f6d29adffab79eddf /src/mongo/db/s/migration_source_manager.h | |
parent | 7920e242c0def907b502265ca14ddf3d86c98025 (diff) | |
download | mongo-95e95613412c33b52bb8a514751550c2447526d4.tar.gz |
SERVER-31056 Remove usages of ScopedCollectionMetadata default constructor
Diffstat (limited to 'src/mongo/db/s/migration_source_manager.h')
-rw-r--r-- | src/mongo/db/s/migration_source_manager.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/mongo/db/s/migration_source_manager.h b/src/mongo/db/s/migration_source_manager.h index 0f90ac96f2b..255aa984024 100644 --- a/src/mongo/db/s/migration_source_manager.h +++ b/src/mongo/db/s/migration_source_manager.h @@ -28,12 +28,9 @@ #pragma once -#include <string> - #include "mongo/base/disallow_copying.h" -#include "mongo/db/s/metadata_manager.h" +#include "mongo/db/s/collection_sharding_state.h" #include "mongo/s/move_chunk_request.h" -#include "mongo/s/shard_key_pattern.h" #include "mongo/util/concurrency/notification.h" #include "mongo/util/timer.h" @@ -157,13 +154,6 @@ public: void cleanupOnError(OperationContext* opCtx); /** - * Returns the key pattern object for the stored committed metadata. - */ - BSONObj getKeyPattern() const { - return _keyPattern; - } - - /** * Returns the cloner which is being used for this migration. This value is available only if * the migration source manager is currently in the clone phase (i.e. the previous call to * startClone has succeeded). @@ -197,6 +187,13 @@ private: enum State { kCreated, kCloning, kCloneCaughtUp, kCriticalSection, kCloneCompleted, kDone }; /** + * If this donation moves the first chunk to the recipient (i.e., the recipient didn't have any + * chunks), this function writes a no-op message to the oplog, so that change stream will notice + * that and close the cursor in order to notify mongos to target the new shard as well. + */ + void _notifyChangeStreamsOnRecipientFirstChunk(OperationContext* opCtx); + + /** * Called when any of the states fails. May only be called once and will put the migration * manager into the kDone state. */ |