diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2019-06-20 08:38:10 -0400 |
---|---|---|
committer | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2019-06-21 20:32:16 -0400 |
commit | 45dc520352849b4b1c958e11f5cec322fb67e8f2 (patch) | |
tree | f56c693957ebb6ac06037e3344d8452ffe770081 /src/mongo/db/namespace_string.cpp | |
parent | 1db8f38916334ba5a47cc1820e5f04f15c369807 (diff) | |
download | mongo-45dc520352849b4b1c958e11f5cec322fb67e8f2.tar.gz |
SERVER-41695 Remove NamespaceString::checkLengthForRename() since there are no more index name length limitations
Diffstat (limited to 'src/mongo/db/namespace_string.cpp')
-rw-r--r-- | src/mongo/db/namespace_string.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/mongo/db/namespace_string.cpp b/src/mongo/db/namespace_string.cpp index ca4f26f0d04..37ffc965c08 100644 --- a/src/mongo/db/namespace_string.cpp +++ b/src/mongo/db/namespace_string.cpp @@ -201,21 +201,6 @@ StatusWith<repl::OpTime> NamespaceString::getDropPendingNamespaceOpTime() const return repl::OpTime(Timestamp(Seconds(seconds), increment), term); } -Status NamespaceString::checkLengthForRename( - const std::string::size_type longestIndexNameLength) const { - auto longestAllowed = - std::min(std::string::size_type(NamespaceString::MaxNsCollectionLen), - std::string::size_type(NamespaceString::MaxNsLen - 2U /*strlen(".$")*/ - - longestIndexNameLength)); - if (size() > longestAllowed) { - StringBuilder sb; - sb << "collection name length of " << size() << " exceeds maximum length of " - << longestAllowed << ", allowing for index names"; - return Status(ErrorCodes::InvalidLength, sb.str()); - } - return Status::OK(); -} - bool NamespaceString::isReplicated() const { if (isLocal()) { return false; |