couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject couch-mrview commit: updated refs/heads/windsor-merge to ad72dc8
Date Tue, 19 Aug 2014 16:48:31 GMT
Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/windsor-merge cd338d60f -> ad72dc84b


Don't use delayed send when a resp hasn't started

This is for a bit of an edge condition if we get an error before we
start streaming data through the coordinator. Easily triggered by
setting all copies of a shard to maintenance mode.


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/ad72dc84
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/ad72dc84
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/ad72dc84

Branch: refs/heads/windsor-merge
Commit: ad72dc84be02f4ce41a837aa7630b385384d37d8
Parents: cd338d6
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Thu Aug 14 12:50:06 2014 -0500
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Tue Aug 19 11:48:28 2014 -0500

----------------------------------------------------------------------
 src/couch_mrview_http.erl | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/ad72dc84/src/couch_mrview_http.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_http.erl b/src/couch_mrview_http.erl
index 1965aa3..4c7355d 100644
--- a/src/couch_mrview_http.erl
+++ b/src/couch_mrview_http.erl
@@ -287,6 +287,9 @@ view_cb(complete, #vacc{resp=Resp}=Acc) ->
         _ ->
             {ok, Acc#vacc{resp=Resp1, prepend=",\r\n"}}
     end;
+view_cb({error, Reason}, #vacc{resp=undefined}=Acc) ->
+    {ok, Resp} = chttpd:send_error(Acc#vacc.req, Reason),
+    {ok, Acc#vacc{resp=Resp}};
 view_cb({error, Reason}, #vacc{resp=Resp}=Acc) ->
     {ok, Resp1} = chttpd:send_delayed_error(Resp, Reason),
     {ok, Acc#vacc{resp=Resp1}}.


Mime
View raw message