diff options
Diffstat (limited to 'src/mongo/db/s/migration_destination_manager.cpp')
-rw-r--r-- | src/mongo/db/s/migration_destination_manager.cpp | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/mongo/db/s/migration_destination_manager.cpp b/src/mongo/db/s/migration_destination_manager.cpp index c2a19f9cf2b..cf0a076e3f4 100644 --- a/src/mongo/db/s/migration_destination_manager.cpp +++ b/src/mongo/db/s/migration_destination_manager.cpp @@ -69,9 +69,6 @@ #include "mongo/util/scopeguard.h" namespace mongo { - -constexpr StringData StartChunkCloneRequest::kSupportsCriticalSectionDuringCatchUp; - namespace { const auto getMigrationDestinationManager = @@ -298,7 +295,6 @@ void MigrationDestinationManager::report(BSONObjBuilder& b, b.append("min", _min); b.append("max", _max); b.append("shardKeyPattern", _shardKeyPattern); - b.append(StartChunkCloneRequest::kSupportsCriticalSectionDuringCatchUp, true); b.append("state", stateToString(_state)); @@ -466,25 +462,6 @@ Status MigrationDestinationManager::startCommit(const MigrationSessionId& sessio stdx::unique_lock<stdx::mutex> lock(_mutex); - const auto convergenceTimeout = - Shard::kDefaultConfigCommandTimeout + Shard::kDefaultConfigCommandTimeout / 4; - - // The donor may have started the commit while the recipient is still busy processing - // the last batch of mods sent in the catch up phase. Allow some time for synching up. - auto deadline = Date_t::now() + convergenceTimeout; - - while (_state == CATCHUP) { - if (stdx::cv_status::timeout == - _stateChangedCV.wait_until(lock, deadline.toSystemTimePoint())) { - return {ErrorCodes::CommandFailed, - str::stream() << "startCommit timed out waiting for the catch up completion. " - << "Sender's session is " - << sessionId.toString() - << ". Current session is " - << (_sessionId ? _sessionId->toString() : "none.")}; - } - } - if (_state != STEADY) { return {ErrorCodes::CommandFailed, str::stream() << "Migration startCommit attempted when not in STEADY state." @@ -512,9 +489,7 @@ Status MigrationDestinationManager::startCommit(const MigrationSessionId& sessio _state = COMMIT_START; _stateChangedCV.notify_all(); - // Assigning a timeout slightly higher than the one used for network requests to the config - // server. Enough time to retry at least once in case of network failures (SERVER-51397). - deadline = Date_t::now() + convergenceTimeout; + auto const deadline = Date_t::now() + Seconds(30); while (_sessionId) { if (stdx::cv_status::timeout == _isActiveCV.wait_until(lock, deadline.toSystemTimePoint())) { @@ -938,7 +913,6 @@ void MigrationDestinationManager::_migrateDriver(OperationContext* opCtx) { const auto& mods = res.response; if (mods["size"].number() == 0) { - // There are no more pending modifications to be applied. End the catchup phase break; } |