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 0dfa7b7
Date Tue, 19 Aug 2014 16:42:03 GMT
Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/windsor-merge cd338d60f -> 0dfa7b7ef (forced update)


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

Branch: refs/heads/windsor-merge
Commit: 0dfa7b7ef3e9e9752e2059e3f5b7b123a5f2c3e9
Parents: 911e5e9
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: Thu Aug 14 12:50:06 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/0dfa7b7e/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