summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/migration_source_manager.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-03-13 15:19:40 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-03-13 18:54:52 -0400
commit296f242fedb66eff99861f4fa3cda1ffc552ad9d (patch)
tree53eb40b543826af099429e06c36ef2575122efb6 /src/mongo/db/s/migration_source_manager.h
parenta1b194059660d78afba0d8750231f48e4f77f2a6 (diff)
downloadmongo-296f242fedb66eff99861f4fa3cda1ffc552ad9d.tar.gz
SERVER-29908 Move the migration critical section out of MigrationSourceManager
Diffstat (limited to 'src/mongo/db/s/migration_source_manager.h')
-rw-r--r--src/mongo/db/s/migration_source_manager.h26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/mongo/db/s/migration_source_manager.h b/src/mongo/db/s/migration_source_manager.h
index cb24599e519..9c37802441e 100644
--- a/src/mongo/db/s/migration_source_manager.h
+++ b/src/mongo/db/s/migration_source_manager.h
@@ -32,13 +32,12 @@
#include "mongo/base/disallow_copying.h"
#include "mongo/db/s/collection_sharding_state.h"
+#include "mongo/db/s/migration_chunk_cloner_source.h"
#include "mongo/s/request_types/move_chunk_request.h"
-#include "mongo/util/concurrency/notification.h"
#include "mongo/util/timer.h"
namespace mongo {
-class MigrationChunkClonerSource;
class OperationContext;
struct ShardingStatistics;
@@ -168,16 +167,6 @@ public:
}
/**
- * Retrieves a critical section object to wait on. Will return nullptr if the migration is not
- * yet in the critical section or if the caller is a reader and the migration is still in the
- * process of transferring the last batch of chunk modifications.
- *
- * Must be called with some form of lock on the collection namespace.
- */
- std::shared_ptr<Notification<void>> getMigrationCriticalSectionSignal(
- bool isForReadOnlyOperation) const;
-
- /**
* Returns a report on the active migration.
*
* Must be called with some form of lock on the collection namespace.
@@ -238,19 +227,6 @@ private:
// completed.
std::unique_ptr<MigrationChunkClonerSource> _cloneDriver;
- // Whether the source manager is in a critical section. Tracked as a shared pointer so that
- // callers don't have to hold collection lock in order to wait on it. Available after the
- // critical section stage has completed.
- std::shared_ptr<Notification<void>> _critSecSignal;
-
- // Used to delay blocking reads up until the commit of the metadata on the config server needs
- // to happen. This allows the shard to serve reads during transfer of the last batch of mods in
- // the migration critical section.
- //
- // The transition from false to true is protected by the collection X-lock, which happens just
- // before the config server metadata commit is scheduled.
- bool _readsShouldWaitOnCritSec{false};
-
// The statistics about a chunk migration to be included in moveChunk.commit
BSONObj _recipientCloneCounts;
};