You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2018/11/09 14:38:18 UTC

[couchdb] branch mem3-seedlist updated (6f35073 -> 83f2ea5)

This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a change to branch mem3-seedlist
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


    from 6f35073  Add some unit tests for seedlist configuration
     new 7fd12f7  Rename pull_from_seed to pull_replication
     new 31d7a3a  Remove superfluous start_replication messages
     new 83f2ea5  Add description of `seedlist` config option

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 rel/overlay/etc/default.ini | 7 +++++++
 src/mem3/src/mem3_rpc.erl   | 4 ++--
 src/mem3/src/mem3_seeds.erl | 3 +--
 3 files changed, 10 insertions(+), 4 deletions(-)


[couchdb] 03/03: Add description of `seedlist` config option

Posted by ko...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a commit to branch mem3-seedlist
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 83f2ea55294965a457b88ef33fa3e9428a2f8908
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Fri Nov 9 09:29:46 2018 -0500

    Add description of `seedlist` config option
---
 rel/overlay/etc/default.ini | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/rel/overlay/etc/default.ini b/rel/overlay/etc/default.ini
index ba2a498..e29977c 100644
--- a/rel/overlay/etc/default.ini
+++ b/rel/overlay/etc/default.ini
@@ -77,6 +77,13 @@ q=8
 n=3
 ; placement = metro-dc-a:2,metro-dc-b:1
 
+; Supply a comma-delimited list of node names that this node should
+; contact in order to join a cluster. If a seedlist is configured the ``_up``
+; endpoint will return a 404 until the node has successfully contacted at
+; least one of the members of the seedlist and replicated an up-to-date copy
+; of the ``_nodes``, ``_dbs``, and ``_users`` system databases.
+; seedlist = couchdb@node1.example.com,couchdb@node2.example.com
+
 [chttpd]
 ; These settings affect the main, clustered port (5984 by default).
 port = {{cluster_port}}


[couchdb] 01/03: Rename pull_from_seed to pull_replication

Posted by ko...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a commit to branch mem3-seedlist
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 7fd12f798680ad51f680ccfec338756930acce41
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Fri Nov 9 09:07:13 2018 -0500

    Rename pull_from_seed to pull_replication
---
 src/mem3/src/mem3_rpc.erl   | 4 ++--
 src/mem3/src/mem3_seeds.erl | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mem3/src/mem3_rpc.erl b/src/mem3/src/mem3_rpc.erl
index 74d82b2..61a29d9 100644
--- a/src/mem3/src/mem3_rpc.erl
+++ b/src/mem3/src/mem3_rpc.erl
@@ -19,7 +19,7 @@
     find_common_seq/4,
     get_missing_revs/4,
     update_docs/4,
-    pull_from_seed/1,
+    pull_replication/1,
     load_checkpoint/4,
     save_checkpoint/6,
 
@@ -46,7 +46,7 @@
 % "Pull" is a bit of a misnomer here, as what we're actually doing is
 % issuing an RPC request and telling the remote node to push updates to
 % us. This lets us reuse all of the battle-tested machinery of mem3_rpc.
-pull_from_seed(Seed) ->
+pull_replication(Seed) ->
     rexi_call(Seed, {mem3_rpc, pull_replication_rpc, [node()]}).
 
 get_missing_revs(Node, DbName, IdsRevs, Options) ->
diff --git a/src/mem3/src/mem3_seeds.erl b/src/mem3/src/mem3_seeds.erl
index 67aab2a..7946396 100644
--- a/src/mem3/src/mem3_seeds.erl
+++ b/src/mem3/src/mem3_seeds.erl
@@ -97,7 +97,7 @@ start_replication([]) ->
     nil;
 start_replication([Seed | _]) ->
     spawn_monitor(fun() ->
-        Reply = mem3_rpc:pull_from_seed(Seed),
+        Reply = mem3_rpc:pull_replication(Seed),
         exit({ok, Reply})
     end).
 


[couchdb] 02/03: Remove superfluous start_replication messages

Posted by ko...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a commit to branch mem3-seedlist
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 31d7a3a31780f210051c8c4b0a703a6aec7b2cc5
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Fri Nov 9 09:09:31 2018 -0500

    Remove superfluous start_replication messages
    
    This is a holdover from an initial prototype; the current version is
    already equipped to run start_replication only as often as necessary to
    get the node into a ready state.
---
 src/mem3/src/mem3_seeds.erl | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/mem3/src/mem3_seeds.erl b/src/mem3/src/mem3_seeds.erl
index 7946396..f1aceb9 100644
--- a/src/mem3/src/mem3_seeds.erl
+++ b/src/mem3/src/mem3_seeds.erl
@@ -55,7 +55,6 @@ get_status() ->
 
 init([]) ->
     Seeds = get_seeds(),
-    timer:send_interval(?REPLICATION_INTERVAL, start_replication),
     InitStatus = [{Seed, {[]}} || Seed <- Seeds],
     State = #st{
         seeds = Seeds,