davisp commented on a change in pull request #1804: Make view query limits
configurable
URL: https://github.com/apache/couchdb/pull/1804#discussion_r240670294
##########
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
Review comment:
Super minor nit but I'd probably use `==` instead of `=:=` here. Only
because I had to stop and think on whether we needed the stronger `=:=` for any
reason or not.
----------------------------------------------------------------
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