mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-2.2' into cassandra-3.0
This commit is contained in:
commit
a54589e122
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue