Skip to content

Commit

Permalink
Make error logging configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
jwolski committed Oct 20, 2015
1 parent 3e5f8a9 commit ba045db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion lib/gossip/joiner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ' +
Expand Down

0 comments on commit ba045db

Please sign in to comment.