You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2017/07/30 21:15:41 UTC

[1/2] couchdb-setup git commit: fix: make sure cluster setups do not exceed n=3 by default

Repository: couchdb-setup
Updated Branches:
  refs/heads/master 4d9bd589f -> 9fd7f4480


fix: make sure cluster setups do not exceed n=3 by default

Single node setups want an n=1 setting, but that is the only
time the number of nodes and the number of replicas is linked.

In larger clusters, the values should not be the same. This
patch ensures that for clusters >3 nodes, we do not have to
tell the users to set node_count to 3 in the _cluster_setup
API.

More context for this in https://issues.apache.org/jira/browse/COUCHDB-2594


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

Branch: refs/heads/master
Commit: 68545afed1000d69cdebbe36c4b7962e6305473b
Parents: 4d9bd58
Author: Jan Lehnardt <ja...@apache.org>
Authored: Sun Jul 30 10:07:46 2017 +0200
Committer: Joan Touzet <jo...@atypical.net>
Committed: Sun Jul 30 17:12:54 2017 -0400

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


http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/68545afe/src/setup.erl
----------------------------------------------------------------------
diff --git a/src/setup.erl b/src/setup.erl
index d0ecd2c..9433186 100644
--- a/src/setup.erl
+++ b/src/setup.erl
@@ -169,7 +169,9 @@ setup_node(NewCredentials, NewBindAddress, NodeCount, Port) ->
             config:set("chttpd", "bind_address", binary_to_list(NewBindAddress))
     end,
 
-    config:set_integer("cluster", "n", NodeCount),
+    % for single node setups, set n=1, for larger setups, don’t
+    % exceed n=3 as a default
+    config:set_integer("cluster", "n", min(NodeCount, 3)),
 
     case Port of
         undefined ->


[2/2] couchdb-setup git commit: Merge branch 'fix/node-count' of https://github.com/apache/couchdb-setup

Posted by wo...@apache.org.
Merge branch 'fix/node-count' of https://github.com/apache/couchdb-setup


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

Branch: refs/heads/master
Commit: 9fd7f448065b4eb29910c9e14d1ac89af589e3c1
Parents: 4d9bd58 68545af
Author: Joan Touzet <jo...@atypical.net>
Authored: Sun Jul 30 17:15:08 2017 -0400
Committer: Joan Touzet <jo...@atypical.net>
Committed: Sun Jul 30 17:15:08 2017 -0400

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