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/10 19:40:36 UTC
[couchdb] branch 63012-scheduler updated: [fixup] comment for
scheduler backoff math
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 7121102 [fixup] comment for scheduler backoff math
7121102 is described below
commit 712110230e9812bdcfab0748339cd63feaeffcb5
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Mon Apr 10 15:40:31 2017 -0400
[fixup] comment for scheduler backoff math
---
src/couch_replicator/src/couch_replicator_scheduler.erl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/couch_replicator/src/couch_replicator_scheduler.erl b/src/couch_replicator/src/couch_replicator_scheduler.erl
index b629cbb..ce17e58 100644
--- a/src/couch_replicator/src/couch_replicator_scheduler.erl
+++ b/src/couch_replicator/src/couch_replicator_scheduler.erl
@@ -525,6 +525,10 @@ latest_crash_timestamp([_Event | Rest]) ->
-spec backoff_micros(non_neg_integer()) -> non_neg_integer().
backoff_micros(CrashCount) ->
+ % When calculating the backoff interval treat consecutive crash count as the
+ % exponent in Base * 2 ^ CrashCount to achieve an exponential backoff
+ % doubling every consecutive failure, starting with the base value of
+ % ?BACKOFF_INTERVAL_MICROS.
BackoffExp = erlang:min(CrashCount - 1, ?MAX_BACKOFF_EXPONENT),
(1 bsl BackoffExp) * ?BACKOFF_INTERVAL_MICROS.
--
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].