Repository: kudu
Updated Branches:
  refs/heads/master dd49515f3 -> b069dd28b

make election timeout jitter more aggressive

Random election timeout jitter is necessary in Raft in order to
guarantee that an election can be won. If the jitter is smaller than RTT
or the accuracy of clocks, then elections could fail indefinitely. We
frequently hit an issue during tests where timeouts tend to 'clump'
together, causing elections to retry many times in a row, ultimately
leading to test timeout. This commit increases the jitter, so that
election timeout differences between nodes will hopefully be greater
than the clock error. This issue could also manifest if the RTT between
nodes is high.

Change-Id: I2c9dad820c2b7d4bc4b9e791b78222559cdf63c8
Tested-by: Kudu Jenkins
Reviewed-by: Dan Burkert <>


Branch: refs/heads/master
Commit: b069dd28b5ef52a4b2f096ef7601b24a55e49117
Parents: dd49515
Author: Dan Burkert <>
Authored: Fri Sep 16 10:32:41 2016 -0700
Committer: Dan Burkert <>
Committed: Fri Sep 16 21:41:49 2016 +0000

 src/kudu/consensus/ | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/kudu/consensus/ 
index 5e88be7..7a302b5 100644
--- a/src/kudu/consensus/
+++ b/src/kudu/consensus/
@@ -1997,7 +1997,7 @@ MonoDelta 
RaftConsensus::LeaderElectionExpBackoffDeltaUnlocked() {
   int term_difference =  state_->GetCurrentTermUnlocked() -
-  double backoff_factor = pow(1.1, term_difference);
+  double backoff_factor = pow(1.5, term_difference);
   double min_timeout = MinimumElectionTimeout().ToMilliseconds();
   double max_timeout = std::min<double>(
       min_timeout * backoff_factor,

Reply via email to