jiahuili430 commented on code in PR #4414:
URL: https://github.com/apache/couchdb/pull/4414#discussion_r1146686878
##########
src/couch_mrview/src/couch_mrview_util.erl:
##########
@@ -581,13 +581,12 @@ validate_args(Args) ->
ok;
{[], _, _} ->
ok;
+ {[Key], StartKey, EndKey} when Key =:= StartKey andalso Key =:= EndKey
->
Review Comment:
Tried to return Args#mrargs{start_key = Val1, end_key = Val1,
`keys=undefined`}, but it would bring another change to `_all_docs`.
If we query with single element keys, and the key is a deleted doc id.
- Before: it will return key-value pair with `deleted:true`.
- After: it will return rows: []
If we don't reset the key to undefined, we just add an exception. Query with
keys([Key]), when `Key==start_key && Key==end_key`, return value instead of
throwing 400 error.
--
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]