You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2017/04/09 04:10:35 UTC

[couchdb] branch 63012-scheduler updated: [fixup] Period0 -> StartPeriod in clustering

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

vatamane pushed a commit to branch 63012-scheduler
in repository https://gitbox.apache.org/repos/asf/couchdb.git

The following commit(s) were added to refs/heads/63012-scheduler by this push:
       new  8062b7c   [fixup] Period0 -> StartPeriod in clustering
8062b7c is described below

commit 8062b7cafac8c5507a074b6d4bdc6b3a370c3e99
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Sun Apr 9 00:10:29 2017 -0400

    [fixup] Period0 -> StartPeriod in clustering
---
 src/couch_replicator/src/couch_replicator_clustering.erl | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/couch_replicator/src/couch_replicator_clustering.erl b/src/couch_replicator/src/couch_replicator_clustering.erl
index 285be37..b37b8e7 100644
--- a/src/couch_replicator/src/couch_replicator_clustering.erl
+++ b/src/couch_replicator/src/couch_replicator_clustering.erl
@@ -169,15 +169,19 @@ new_timer(IntervalSec) ->
     Timer.
 
 
+% For the first Period seconds after node boot we check cluster stability every
+% StartPeriod seconds. Once the initial Period seconds have passed we continue
+% to monitor once every Period seconds
 -spec interval(#state{}) -> non_neg_integer().
-interval(#state{period = Period, start_period = Period0, start_time = T0}) ->
+interval(#state{period = Period, start_period = StartPeriod,
+        start_time = T0}) ->
     case now_diff_sec(T0) > Period of
         true ->
             % Normal operation
             Period;
         false ->
             % During startup
-            Period0
+            StartPeriod
     end.
 
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].