diff --git a/src/java/org/apache/cassandra/gms/FailureDetector.java b/src/java/org/apache/cassandra/gms/FailureDetector.java index 4a73c5789b..5a72976a0e 100644 --- a/src/java/org/apache/cassandra/gms/FailureDetector.java +++ b/src/java/org/apache/cassandra/gms/FailureDetector.java @@ -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);