summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2020-04-16 10:06:11 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-16 15:55:42 +0000
commit9d9092639bd90dcd27d06c0ac31ff043b721694a (patch)
tree2e3efef13a0503a3006e79bf724be1fea4ecb432 /src
parent03793e2a6a59566858f993598a3eb924def58a1a (diff)
downloadmongo-9d9092639bd90dcd27d06c0ac31ff043b721694a.tar.gz
SERVER-47562 Get rid of unused code and TODO marker in rename_collection.cpp
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/catalog/rename_collection.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/mongo/db/catalog/rename_collection.cpp b/src/mongo/db/catalog/rename_collection.cpp
index ba323fca0b7..8041004b415 100644
--- a/src/mongo/db/catalog/rename_collection.cpp
+++ b/src/mongo/db/catalog/rename_collection.cpp
@@ -65,7 +65,6 @@
namespace mongo {
namespace {
-MONGO_FAIL_POINT_DEFINE(useRenameCollectionPathThroughConfigsvr);
MONGO_FAIL_POINT_DEFINE(writeConflictInRenameCollCopyToTmp);
boost::optional<NamespaceString> getNamespaceFromUUID(OperationContext* opCtx, const UUID& uuid) {
@@ -99,11 +98,8 @@ Status checkSourceAndTargetNamespaces(OperationContext* opCtx,
str::stream() << "Not primary while renaming collection " << source << " to "
<< target);
- // TODO: SERVER-42638 Replace checks of cm() with cm()->distributionMode() == sharded
- if (!MONGO_unlikely(useRenameCollectionPathThroughConfigsvr.shouldFail())) {
- if (isCollectionSharded(opCtx, source))
- return {ErrorCodes::IllegalOperation, "source namespace cannot be sharded"};
- }
+ if (isCollectionSharded(opCtx, source))
+ return {ErrorCodes::IllegalOperation, "source namespace cannot be sharded"};
if (isReplicatedChanged(opCtx, source, target))
return {ErrorCodes::IllegalOperation,
@@ -501,11 +497,8 @@ Status renameBetweenDBs(OperationContext* opCtx,
return Status(ErrorCodes::NamespaceNotFound, "source namespace does not exist");
}
- // TODO: SERVER-42638 Replace checks of cm() with cm()->distributionMode() == sharded
- if (!MONGO_unlikely(useRenameCollectionPathThroughConfigsvr.shouldFail())) {
- if (isCollectionSharded(opCtx, source))
- return {ErrorCodes::IllegalOperation, "source namespace cannot be sharded"};
- }
+ if (isCollectionSharded(opCtx, source))
+ return {ErrorCodes::IllegalOperation, "source namespace cannot be sharded"};
if (isReplicatedChanged(opCtx, source, target))
return {ErrorCodes::IllegalOperation,