You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/08/01 11:06:56 UTC

[27/27] rexi commit: updated refs/heads/windsor-merge to 096f0cf

Fix error_limit = 0, and make it the default

Setting the error_limit to 0 would previously cause rexi_server to crash
on the next error because of an unhandled exception in a queue:drop/1.
This fixes that exception and makes a limit of 0 the default. Operators
can still raise the limit to capture errors in the future if we end up
finding that useful.

BugzID: 30821


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rexi/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rexi/commit/096f0cfb
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rexi/tree/096f0cfb
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rexi/diff/096f0cfb

Branch: refs/heads/windsor-merge
Commit: 096f0cfb1a6f85880685b7b65d44f00a582436d3
Parents: 9a1bbd0
Author: Adam Kocoloski <ad...@cloudant.com>
Authored: Thu Jun 26 19:49:30 2014 -0400
Committer: Robert Newson <rn...@apache.org>
Committed: Wed Jul 23 18:08:32 2014 +0100

----------------------------------------------------------------------
 src/rexi_server.erl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rexi/blob/096f0cfb/src/rexi_server.erl
----------------------------------------------------------------------
diff --git a/src/rexi_server.erl b/src/rexi_server.erl
index 3bb85a0..5f9976d 100644
--- a/src/rexi_server.erl
+++ b/src/rexi_server.erl
@@ -32,7 +32,7 @@
     workers = ets:new(workers, [private, {keypos, #job.worker}]),
     clients = ets:new(clients, [private, {keypos, #job.client}]),
     errors = queue:new(),
-    error_limit = 20,
+    error_limit = 0,
     error_count = 0
 }).
 
@@ -151,6 +151,8 @@ init_p(From, {M,F,A}, Nonce) ->
 
 %% internal
 
+save_error(_E, #st{error_limit = 0} = St) ->
+    St;
 save_error(E, #st{errors=Q, error_limit=L, error_count=C} = St) when C >= L ->
     St#st{errors = queue:in(E, queue:drop(Q))};
 save_error(E, #st{errors=Q, error_count=C} = St) ->