smiklosovic commented on code in PR #2046:
URL: https://github.com/apache/cassandra/pull/2046#discussion_r1153027567


##########
src/java/org/apache/cassandra/gms/FailureDetector.java:
##########
@@ -93,16 +95,14 @@ public FailureDetector()
 
     private static long getInitialValue()
     {
-        String newvalue = System.getProperty("cassandra.fd_initial_value_ms");
-        if (newvalue == null)
-        {
+        Long newValue = FD_INITIAL_VALUE_MS.getLong();
+        if (newValue == null)
             return Gossiper.intervalInMillis * 2;
-        }
-        else
-        {
-            logger.info("Overriding FD INITIAL_VALUE to {}ms", newvalue);
-            return Integer.parseInt(newvalue);
-        }
+
+        if (newValue != Gossiper.intervalInMillis * 2)

Review Comment:
   I do not get why we are doing here that `if`. The previous code is:
   
   ````
       private static long getInitialValue()
       {
           String newvalue = 
System.getProperty("cassandra.fd_initial_value_ms");
           if (newvalue == null)
           {
               return Gossiper.intervalInMillis * 2;
           }
           else
           {
               logger.info("Overriding FD INITIAL_VALUE to {}ms", newvalue);
               return Integer.parseInt(newvalue);
           }
       }
   ````
   
   We log it every time `newvalue` is not null. Why do we set that condition 
for logging when it is not equal two times internvalInMillis?
   
   I think this is mostly OK because we already went through it but I just do 
not recall the logic in that anymore. Could you help me with that?



-- 
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