You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ii...@apache.org on 2016/06/13 18:20:24 UTC

[1/2] fabric commit: updated refs/heads/master to 9f4c999

Repository: couchdb-fabric
Updated Branches:
  refs/heads/master e5c9c62d8 -> 9f4c9994f


Fix rexi_DOWN and rexi_EXIT handlers

In the cases when we receive rexi_DOWN or rexi_EXIT we call
handle_message with {ok, []}. This crashes lists:min/1. Since it expects
a list with at least one element.

COUCHDB-3037


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

Branch: refs/heads/master
Commit: a506e8d5982cfe8081c50c0f96ee1938f8585e5e
Parents: e5c9c62
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Mon Jun 13 09:19:03 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Mon Jun 13 09:19:03 2016 -0700

----------------------------------------------------------------------
 src/fabric_doc_open_revs.erl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/a506e8d5/src/fabric_doc_open_revs.erl
----------------------------------------------------------------------
diff --git a/src/fabric_doc_open_revs.erl b/src/fabric_doc_open_revs.erl
index 0924313..9228991 100644
--- a/src/fabric_doc_open_revs.erl
+++ b/src/fabric_doc_open_revs.erl
@@ -160,8 +160,10 @@ sort_key({{not_found, _}, {Pos, Rev}}) ->
 
 
 dict_replies(Dict, []) ->
-    Counts = [Count || {_Key, {_Reply, Count}} <- Dict],
-    {Dict, lists:min(Counts)};
+    case [Count || {_Key, {_Reply, Count}} <- Dict] of
+        [] -> {Dict, 0};
+        Counts -> {Dict, lists:min(Counts)}
+    end;
 
 dict_replies(Dict, [Reply | Rest]) ->
     NewDict = fabric_util:update_counter(Reply, 1, Dict),


[2/2] fabric commit: updated refs/heads/master to 9f4c999

Posted by ii...@apache.org.
Merge remote branch 'cloudant:68151-fix-rexi_DOWN-handler'

This closes #57

Signed-off-by: ILYA Khlopotov <ii...@ca.ibm.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/9f4c9994
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/9f4c9994
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/9f4c9994

Branch: refs/heads/master
Commit: 9f4c9994fd93fb460558324a478189caa5b9330d
Parents: e5c9c62 a506e8d
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Mon Jun 13 11:20:06 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Mon Jun 13 11:20:06 2016 -0700

----------------------------------------------------------------------
 src/fabric_doc_open_revs.erl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------