garrensmith commented on a change in pull request #1804: Make view query limits 
configurable
URL: https://github.com/apache/couchdb/pull/1804#discussion_r249866612
 
 

 ##########
 File path: src/couch_mrview/src/couch_mrview_util.erl
 ##########
 @@ -525,6 +527,33 @@ validate_args(#mrst{} = State, Args0) ->
     end.
 
 
+apply_limit(ViewPartitioned, Args) ->
+    LimitType = case ViewPartitioned of
+        true -> "partition_query_limit";
+        false -> "query_limit"
+    end,
+    
+    MaxLimit = config:get_integer("query_server_config",
+        LimitType, ?MAX_VIEW_LIMIT),
+
+    % set the highest limit possible if a user has not 
+    % specified a limit
+    Args1 = case Args#mrargs.limit =:= ?MAX_VIEW_LIMIT
+        andalso MaxLimit =/= infinity of
 
 Review comment:
   I changed this line from `if Args1#mrargs.limit =:= MaxLimit -> Args1; true 
->` to
   `if Args1#mrargs.limit =< MaxLimit -> Args1; true ->`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to