diff options
author | Alex Taskov <alex.taskov@mongodb.com> | 2020-01-30 21:22:36 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2020-01-30 21:22:36 +0000 |
commit | e4fc8b73d3a943cbc9071320876ea1f58f151bb5 (patch) | |
tree | df6c3c22b3fb938d22c999fff5617cd76be1901c /src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp | |
parent | 94bd81eb2dce3e744a922b27d710ce192a8a3662 (diff) | |
download | mongo-e4fc8b73d3a943cbc9071320876ea1f58f151bb5.tar.gz |
SERVER-45743 Add a flag to allow opting out of using the Resumable RangeDeleter
Diffstat (limited to 'src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp')
-rw-r--r-- | src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp b/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp index 5ba3a2068e7..b9dd891ed17 100644 --- a/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp +++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp @@ -44,6 +44,7 @@ #include "mongo/db/repl/replication_process.h" #include "mongo/db/s/collection_sharding_runtime.h" #include "mongo/db/s/migration_source_manager.h" +#include "mongo/db/s/sharding_runtime_d_params_gen.h" #include "mongo/db/s/sharding_statistics.h" #include "mongo/db/s/start_chunk_clone_request.h" #include "mongo/db/service_context.h" @@ -279,7 +280,8 @@ Status MigrationChunkClonerSourceLegacy::startClone(OperationContext* opCtx, BSONObjBuilder cmdBuilder; auto fcvVersion = serverGlobalParams.featureCompatibility.getVersion(); - if (fcvVersion == ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo44) { + if (fcvVersion == ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo44 && + !disableResumableRangeDeleter.load()) { StartChunkCloneRequest::appendAsCommand(&cmdBuilder, _args.getNss(), migrationId, @@ -292,7 +294,8 @@ Status MigrationChunkClonerSourceLegacy::startClone(OperationContext* opCtx, _shardKeyPattern.toBSON(), _args.getSecondaryThrottle()); } else { - // TODO (SERVER-44787): Remove this overload after 4.4 is released. + // TODO (SERVER-44787): Remove this overload after 4.4 is released AND + // disableResumableRangeDeleter has been removed from server parameters. StartChunkCloneRequest::appendAsCommand(&cmdBuilder, _args.getNss(), _sessionId, |