diff options
Diffstat (limited to 'src/mongo/db/s/auto_split_vector_command.cpp')
| -rw-r--r-- | src/mongo/db/s/auto_split_vector_command.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mongo/db/s/auto_split_vector_command.cpp b/src/mongo/db/s/auto_split_vector_command.cpp index dc4effd9b15..821527cac7d 100644 --- a/src/mongo/db/s/auto_split_vector_command.cpp +++ b/src/mongo/db/s/auto_split_vector_command.cpp @@ -39,8 +39,7 @@ namespace mongo { namespace { -static constexpr int64_t kSmallestChunkSizeBytesSupported = 1024 * 1024; -static constexpr int64_t kBiggestChunkSizeBytesSupported = 1024 * 1024 * 1024; +static constexpr int64_t kSmallestChunkSizeSupported = 1024 * 1024; class AutoSplitVectorCommand final : public TypedCommand<AutoSplitVectorCommand> { public: @@ -76,19 +75,16 @@ public: const auto& req = request(); uassert(ErrorCodes::ErrorCodes::InvalidOptions, - str::stream() << "maxChunksSizeBytes must lie within the range [" - << kSmallestChunkSizeBytesSupported / (1024 * 1024) << "MB, " - << kBiggestChunkSizeBytesSupported / (1024 * 1024) << "MB]", - req.getMaxChunkSizeBytes() >= kSmallestChunkSizeBytesSupported && - req.getMaxChunkSizeBytes() <= kBiggestChunkSizeBytesSupported); + str::stream() << "maxChunksSizeBytes cannot be smaller than " + << kSmallestChunkSizeSupported, + req.getMaxChunkSizeBytes() >= kSmallestChunkSizeSupported); auto [splitPoints, continuation] = autoSplitVector(opCtx, ns(), req.getKeyPattern(), req.getMin(), req.getMax(), - req.getMaxChunkSizeBytes(), - req.getLimit()); + req.getMaxChunkSizeBytes()); Response autoSplitVectorResponse(std::move(splitPoints)); autoSplitVectorResponse.setContinuation(continuation); return autoSplitVectorResponse; |
