jaydoane commented on code in PR #5515:
URL: https://github.com/apache/couchdb/pull/5515#discussion_r2062696071
##########
src/fabric/src/fabric_util.erl:
##########
@@ -326,6 +326,8 @@ is_partitioned(DbName0) when is_binary(DbName0) ->
is_partitioned(Db) ->
couch_db:is_partitioned(Db).
+validate_all_docs_args(DbName, Args) when is_list(DbName) ->
+ validate_all_docs_args(list_to_binary(DbName), Args);
Review Comment:
Also not covered by unit tests.
##########
src/couch_mrview/src/couch_mrview_util.erl:
##########
@@ -522,11 +522,11 @@ apply_limit(ViewPartitioned, Args) ->
{false, _} -> "query_limit"
end,
- MaxLimit = config:get_integer(
- "query_server_config",
- LimitType,
- ?MAX_VIEW_LIMIT
- ),
+ MaxLimit =
+ case config:get("query_server_config", LimitType, "infinity") of
Review Comment:
Nice ergonomic improvement!
##########
src/couch_mrview/src/couch_mrview_show.erl:
##########
@@ -224,7 +224,8 @@ handle_view_list(Req, Db, DDoc, LName, VDDoc, VName, Keys)
->
Acc = #lacc{db = Db, req = Req, qserver = QServer, lname = LName},
case VName of
<<"_all_docs">> ->
- couch_mrview:query_all_docs(Db, Args, fun list_cb/2, Acc);
+ ValidatedArgs =
couch_mrview_util:validate_all_docs_args(Db, Args),
Review Comment:
This line is also not covered by unit tests.
##########
src/couch_mrview/src/couch_mrview_http.erl:
##########
@@ -241,7 +241,8 @@ do_all_docs_req(Req, Db, Keys, NS) ->
),
IsAdmin = is_admin(Db),
Callback = get_view_callback(DbName, UsersDbName, IsAdmin),
- couch_mrview:query_all_docs(Db, Args, Callback, VAcc0)
+ ValidatedArgs = couch_mrview_util:validate_all_docs_args(Db, Args),
Review Comment:
I ran `make eunit` and looked at coverage, but unfortunately this module
looks pretty uncovered
```
couch_mrview_http 6%
```
And in particular this line does not get unit tested.
--
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]