Merge branch 'cassandra-2.2' into cassandra-3.0

This commit is contained in:
Brandon Williams 2015-09-15 16:11:00 -05:00
commit a54589e122
1 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ public class FailureDetector implements IFailureDetector, FailureDetectorMBean
private static final long DEFAULT_MAX_PAUSE = 5000L * 1000000L; // 5 seconds
private static final long MAX_LOCAL_PAUSE_IN_NANOS = getMaxLocalPause();
private long lastInterpret = System.nanoTime();
private boolean wasPaused = false;
private long lastPause = 0L;
private static long getMaxLocalPause()
{
@ -241,12 +241,12 @@ public class FailureDetector implements IFailureDetector, FailureDetectorMBean
if (diff > MAX_LOCAL_PAUSE_IN_NANOS)
{
logger.warn("Not marking nodes down due to local pause of {} > {}", diff, MAX_LOCAL_PAUSE_IN_NANOS);
wasPaused = true;
lastPause = now;
return;
}
if (wasPaused)
if (System.nanoTime() - lastPause < MAX_LOCAL_PAUSE_IN_NANOS)
{
wasPaused = false;
logger.debug("Still not marking nodes down due to local pause");
return;
}
double phi = hbWnd.phi(now);