jacek-lewandowski commented on code in PR #2046:
URL: https://github.com/apache/cassandra/pull/2046#discussion_r1170957153


##########
src/java/org/apache/cassandra/gms/FailureDetector.java:
##########
@@ -55,21 +58,19 @@ public class FailureDetector implements IFailureDetector, 
FailureDetectorMBean
     private static final int SAMPLE_SIZE = 1000;
     protected static final long INITIAL_VALUE_NANOS = 
TimeUnit.NANOSECONDS.convert(getInitialValue(), TimeUnit.MILLISECONDS);
     private static final int DEBUG_PERCENTAGE = 80; // if the phi is larger 
than this percentage of the max, log a debug message
-    private static final long DEFAULT_MAX_PAUSE = 5000L * 1000000L; // 5 
seconds
     private static final long MAX_LOCAL_PAUSE_IN_NANOS = getMaxLocalPause();
     private long lastInterpret = preciseTime.now();
     private long lastPause = 0L;
 
     private static long getMaxLocalPause()
     {
-        if (System.getProperty("cassandra.max_local_pause_in_ms") != null)
-        {
-            long pause = 
Long.parseLong(System.getProperty("cassandra.max_local_pause_in_ms"));
-            logger.warn("Overriding max local pause time to {}ms", pause);
-            return pause * 1000000L;
-        }
-        else
-            return DEFAULT_MAX_PAUSE;
+        long pause = MAX_LOCAL_PAUSE_IN_MS.getLong();
+
+        if 
(!String.valueOf(pause).equals(MAX_LOCAL_PAUSE_IN_MS.getDefaultValue()))

Review Comment:
   Let's keep it as it is and get this ticket merged :)
   
   Just a note - since this is an API, little number of current usages is not a 
good excuse. We want to provide an example for future usages and encourage 
consistency for such patterns. I like your idea with supplier btw.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to