diff options
author | Jamie Heppenstall <jamie.heppenstall@mongodb.com> | 2019-08-06 15:52:35 -0400 |
---|---|---|
committer | Jamie Heppenstall <jamie.heppenstall@mongodb.com> | 2019-08-08 11:47:13 -0400 |
commit | 72520f60c55cf5a78ac3f1a25166ac7bba2c6a3e (patch) | |
tree | f63274b141cc837faf33c0535fb34c835cf304ac /src/mongo/s/shard_key_pattern.cpp | |
parent | 91fe7e5d9f9a221d1e2edc7cca32925bd6675750 (diff) | |
download | mongo-72520f60c55cf5a78ac3f1a25166ac7bba2c6a3e.tar.gz |
SERVER-42368 Remove max shard key size limit of 512 bytes
Diffstat (limited to 'src/mongo/s/shard_key_pattern.cpp')
-rw-r--r-- | src/mongo/s/shard_key_pattern.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/mongo/s/shard_key_pattern.cpp b/src/mongo/s/shard_key_pattern.cpp index 07362cc5fc1..99435233b92 100644 --- a/src/mongo/s/shard_key_pattern.cpp +++ b/src/mongo/s/shard_key_pattern.cpp @@ -154,18 +154,6 @@ BSONElement findEqualityElement(const EqualityMatches& equalities, const FieldRe } // namespace -constexpr int ShardKeyPattern::kMaxShardKeySizeBytes; - -Status ShardKeyPattern::checkShardKeySize(const BSONObj& shardKey) { - if (shardKey.objsize() <= kMaxShardKeySizeBytes) - return Status::OK(); - - return {ErrorCodes::ShardKeyTooBig, - str::stream() << "shard keys must be less than " << kMaxShardKeySizeBytes - << " bytes, but key " << shardKey << " is " << shardKey.objsize() - << " bytes"}; -} - Status ShardKeyPattern::checkShardKeyIsValidForMetadataStorage(const BSONObj& shardKey) { for (const auto& elem : shardKey) { if (!isValidShardKeyElementForStorage(elem)) { |