rnewson commented on code in PR #5728:
URL: https://github.com/apache/couchdb/pull/5728#discussion_r2486291225
##########
share/server/views.js:
##########
@@ -36,20 +36,15 @@ var Views = (function() {
var reduce_line = JSON.stringify(reductions);
var reduce_length = reduce_line.length;
var input_length = State.line_length - code_size
- // TODO make reduce_limit config into a number
if (State.query_config && State.query_config.reduce_limit &&
- reduce_length > 4096 && ((reduce_length * 2) > input_length)) {
+ reduce_length > State.query_config.reduce_limit_threshold &&
+ ((reduce_length * State.query_config.reduce_limit_ratio) >
input_length)) {
var log_message = [
"Reduce output must shrink more rapidly:",
"input size:", input_length,
"output size:", reduce_length
].join(" ");
- if (State.query_config.reduce_limit === "log") {
- log("reduce_overflow_error: " + log_message);
- print("[true," + reduce_line + "]");
- } else {
- throw(["error", "reduce_overflow_error", log_message]);
- };
+ throw(["error", "reduce_overflow_error", log_message]);
Review Comment:
good catch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]