diff options
Diffstat (limited to 'src/mongo/db/s/migration_destination_manager_legacy_commands.cpp')
| -rw-r--r-- | src/mongo/db/s/migration_destination_manager_legacy_commands.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp index cac5a1696db..8233113e409 100644 --- a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp +++ b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp @@ -94,7 +94,6 @@ public: const BSONObj& cmdObj, std::string& errmsg, BSONObjBuilder& result) override { - opCtx->setAlwaysInterruptAtStepDownOrUp(); uassertStatusOK(ShardingState::get(opCtx)->canAcceptShardedCommands()); auto nss = NamespaceString(parseNs(dbname, cmdObj)); @@ -110,19 +109,13 @@ public: // Ensure this shard is not currently receiving or donating any chunks. auto scopedReceiveChunk( uassertStatusOK(ActiveMigrationsRegistry::get(opCtx).registerReceiveChunk( - opCtx, nss, chunkRange, cloneRequest.getFromShardId(), false))); + opCtx, nss, chunkRange, cloneRequest.getFromShardId()))); // We force a refresh immediately after registering this migration to guarantee that this // shard will not receive a chunk after refreshing. onShardVersionMismatch(opCtx, nss, boost::none); const auto shardId = ShardingState::get(opCtx)->shardId(); - // Wait for the ShardServerCatalogCacheLoader to finish flushing the metadata to the - // storage. This is not required for correctness, but helps mitigate stalls on secondaries - // when a shard receives the first chunk for a collection with a large routing table. - CatalogCacheLoader::get(opCtx).waitForCollectionFlush(opCtx, nss); - repl::ReplClientInfo::forClient(opCtx->getClient()).setLastOpToSystemLastOpTime(opCtx); - const auto collectionEpoch = [&] { AutoGetCollection autoColl(opCtx, nss, MODE_IS); auto const optMetadata = |
