diff options
author | Mickey. J Winters <mickey.winters@mongodb.com> | 2021-10-27 18:48:06 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-10-27 19:14:19 +0000 |
commit | 21d17ccf68b42fa49dd378f7a084da153ad79d3a (patch) | |
tree | b2a6e127ffed482f15fc63c4bb0c65b71fa4ab89 /src/mongo/db/query/query_knobs.cpp | |
parent | 0ff1013b7da4f6e2b61cc6eab6f846d05bc80206 (diff) | |
download | mongo-21d17ccf68b42fa49dd378f7a084da153ad79d3a.tar.gz |
SERVER-59613 $range expression should error if it exceeds memory limit
(cherry picked from commit ca2053d172076c106c994564b92109d1a973ed81)
Diffstat (limited to 'src/mongo/db/query/query_knobs.cpp')
-rw-r--r-- | src/mongo/db/query/query_knobs.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/query/query_knobs.cpp b/src/mongo/db/query/query_knobs.cpp index 2cd2c61f022..207d1f89114 100644 --- a/src/mongo/db/query/query_knobs.cpp +++ b/src/mongo/db/query/query_knobs.cpp @@ -137,6 +137,14 @@ MONGO_EXPORT_SERVER_PARAMETER(internalQueryMaxAddToSetBytes, int, 100 * 1024 * 1 return Status::OK(); }); +MONGO_EXPORT_SERVER_PARAMETER(internalQueryMaxRangeBytes, int, 100 * 1024 * 1024) + ->withValidator([](const int& newVal) { + if (newVal <= 0) { + return Status(ErrorCodes::BadValue, "internalQueryMaxRangeBytes must be positive"); + } + return Status::OK(); + }); + MONGO_EXPORT_SERVER_PARAMETER(internalQueryExplainSizeThresholdBytes, int, 10 * 1024 * 1024) ->withValidator([](const int& newVal) { if (newVal <= 0) { |