summaryrefslogtreecommitdiff
path: root/src/mongo/db/namespace_string.cpp
diff options
context:
space:
mode:
authorAlex Taskov <alex.taskov@mongodb.com>2020-10-07 17:33:05 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-10-08 07:40:12 +0000
commit1f11a9c73e11ebb6a89b1600a0a03741111c48bc (patch)
tree446c578827505916fc4e3d7119ac5b261e40699e /src/mongo/db/namespace_string.cpp
parent5c1ec93ae1ade70ea176060166b1c96c8ec01e48 (diff)
downloadmongo-1f11a9c73e11ebb6a89b1600a0a03741111c48bc.tar.gz
SERVER-51347 Allow writes on a collection string-matching '.system.resharding.' for Resharding
Diffstat (limited to 'src/mongo/db/namespace_string.cpp')
-rw-r--r--src/mongo/db/namespace_string.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/namespace_string.cpp b/src/mongo/db/namespace_string.cpp
index b884d0e8ff5..2f67bdc839e 100644
--- a/src/mongo/db/namespace_string.cpp
+++ b/src/mongo/db/namespace_string.cpp
@@ -126,6 +126,8 @@ bool NamespaceString::isLegalClientSystemNS() const {
return true;
if (coll() == kIndexBuildEntryNamespace.coll())
return true;
+ if (coll().find(".system.resharding.") != std::string::npos)
+ return true;
} else if (db() == kLocalDb) {
if (coll() == kSystemReplSetNamespace.coll())
return true;
@@ -140,7 +142,6 @@ bool NamespaceString::isLegalClientSystemNS() const {
if (coll() == kSystemDotViewsCollectionName)
return true;
if (isTemporaryReshardingCollection()) {
- // Permit integration testing on resharding collections.
return true;
}