From ba045db46433ef654b50e4eaa2d48179ed22401f Mon Sep 17 00:00:00 2001 From: Jeff Wolski Date: Tue, 20 Oct 2015 05:40:11 +0200 Subject: [PATCH] Make error logging configurable --- config.js | 1 + lib/gossip/joiner.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config.js b/config.js index 5ee6fb72..82bb2712 100644 --- a/config.js +++ b/config.js @@ -87,6 +87,7 @@ Config.prototype._seed = function _seed(seed) { // Joiner config seedOrDefault('joinDelayMin', 100, numValidator); // ms seedOrDefault('joinDelayMax', 2 * 60 * 1000, numValidator); // 2 min in ms + seedOrDefault('joinTroubleErrorEnabled', true); seedOrDefault('maxJoinDuration', 20 * 60 * 1000, numValidator); // 20 mins in ms seedOrDefault('memberBlacklist', [], function validator(vals) { diff --git a/lib/gossip/joiner.js b/lib/gossip/joiner.js index 837af7aa..75e0e2f7 100644 --- a/lib/gossip/joiner.js +++ b/lib/gossip/joiner.js @@ -274,7 +274,8 @@ Joiner.prototype.join = function join(callback) { // Determine if the join delay has exceeded the maximum // delay and send out a warning letting developer's know // that Ringpop is having trouble. - if (oldJoinDelay < delayMax && + if (self.ringpop.config.get('joinTroubleErrorEnabled') && + oldJoinDelay < delayMax && self.joinDelay >= delayMax) { var errorMsg = 'ringpop joiner reached max retry delay. ' + 'this is a strong indication that ringpop is having ' +