Github user eiri commented on a diff in the pull request:
https://github.com/apache/couchdb-chttpd/pull/125#discussion_r66286884
--- Diff: src/chttpd_view.erl ---
@@ -33,8 +33,7 @@ multi_query_view(Req, Db, DDoc, ViewName, Queries) ->
Acc1
end, VAcc1, ArgQueries),
{ok, Resp1} = chttpd:send_delayed_chunk(VAcc2#vacc.resp, "\r\n]}"),
- {ok, Resp2} = chttpd:end_delayed_json_response(Resp1),
- {ok, Resp2#vacc.resp}.
+ chttpd:end_delayed_json_response(Resp1).
--- End diff --
In `design_doc_view` the last thing we are calling `fabric:query_view/6`
which _is_ returning vacc record. Here we are extracting response from vacc and
then passing it through `chttpd:send_delayed_chunk/2` and
`chttpd:end_delayed_json_response/1`. i.e. we are passing around delayed_resp
records, but expecting to get as a result vacc record as Resp2.
I'm basically reverting `multi_query_view` to how it is in dbcore and how
it was in Couch prior [this
commit](https://github.com/apache/couchdb-chttpd/pull/94). Why do you think
this is incorrect fix?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---