diff options
author | Esha Maharishi <esha.maharishi@mongodb.com> | 2020-05-12 17:26:45 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-05-18 04:14:45 +0000 |
commit | d0e6f87351312a299a17f6d63e3f2f4db834ae1f (patch) | |
tree | cf758ddf2c85d414d9eab4aa1b318791934aae30 /src/mongo/db/s/migration_util.cpp | |
parent | 7e2111ef33fc40959a254bd3109466176ae60718 (diff) | |
download | mongo-d0e6f87351312a299a17f6d63e3f2f4db834ae1f.tar.gz |
SERVER-47992 Make disableResumableRangeDeleter just prevent ranges from being submitted for deletio
Diffstat (limited to 'src/mongo/db/s/migration_util.cpp')
-rw-r--r-- | src/mongo/db/s/migration_util.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/s/migration_util.cpp b/src/mongo/db/s/migration_util.cpp index fa8c0f89365..57bbe3f635a 100644 --- a/src/mongo/db/s/migration_util.cpp +++ b/src/mongo/db/s/migration_util.cpp @@ -53,6 +53,7 @@ #include "mongo/db/s/collection_sharding_runtime.h" #include "mongo/db/s/migration_coordinator.h" #include "mongo/db/s/shard_filtering_metadata_refresh.h" +#include "mongo/db/s/sharding_runtime_d_params_gen.h" #include "mongo/db/s/sharding_statistics.h" #include "mongo/db/s/wait_for_majority_service.h" #include "mongo/db/write_concern.h" @@ -294,6 +295,13 @@ ExecutorFuture<void> submitRangeDeletionTask(OperationContext* opCtx, auto uniqueOpCtx = tc->makeOperationContext(); auto opCtx = uniqueOpCtx.get(); + uassert( + ErrorCodes::ResumableRangeDeleterDisabled, + str::stream() + << "Not submitting range deletion task " << redact(deletionTask.toBSON()) + << " because the disableResumableRangeDeleter server parameter is set to true", + !disableResumableRangeDeleter.load()); + // Make sure the collection metadata is up-to-date. { boost::optional<AutoGetCollection> autoColl; |