couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [1/3] couch-mrview commit: updated refs/heads/master to 9133f6d
Date Thu, 25 Aug 2016 18:00:11 GMT
Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/master e9e84c5d5 -> 9133f6d16


Introduce reset_vacc

COUCHDB-3060


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/0db83c4c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/0db83c4c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/0db83c4c

Branch: refs/heads/master
Commit: 0db83c4c8ce9819c00975f0a024e246bf4e3bd6f
Parents: e9e84c5
Author: Robert Newson <rnewson@apache.org>
Authored: Thu Aug 25 16:01:25 2016 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Thu Aug 25 16:01:26 2016 +0100

----------------------------------------------------------------------
 src/couch_mrview_http.erl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/0db83c4c/src/couch_mrview_http.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_http.erl b/src/couch_mrview_http.erl
index 529d208..253ee30 100644
--- a/src/couch_mrview_http.erl
+++ b/src/couch_mrview_http.erl
@@ -309,7 +309,7 @@ multi_query_view(Req, Db, DDoc, ViewName, Queries) ->
         VAcc1 = VAcc0#vacc{resp=Resp0},
         VAcc2 = lists:foldl(fun(Args, Acc0) ->
             {ok, Acc1} = couch_mrview:query_view(Db, DDoc, ViewName, Args, fun view_cb/2,
Acc0),
-            Acc1
+            reset_vacc(Acc1)
         end, VAcc1, ArgQueries),
         {ok, Resp1} = chttpd:send_delayed_chunk(VAcc2#vacc.resp, "\r\n]}"),
         {ok, Resp2} = chttpd:end_delayed_json_response(Resp1),
@@ -320,6 +320,10 @@ multi_query_view(Req, Db, DDoc, ViewName, Queries) ->
         _ -> {ok, Resp2}
     end.
 
+%% reset between queries in multi-query
+reset_vacc(Vacc) ->
+    Vacc#vacc{row_sent=false}.
+
 
 filtered_view_cb({row, Row0}, Acc) ->
   Row1 = lists:map(fun({doc, null}) ->


Mime
View raw message