skoppu22 commented on code in PR #4737:
URL: https://github.com/apache/cassandra/pull/4737#discussion_r3101140372


##########
src/java/org/apache/cassandra/service/DataResurrectionCheck.java:
##########
@@ -158,6 +160,38 @@ static File getHeartbeatFile(Map<String, Object> config)
         return heartbeatFile;
     }
 
+    static long getMinimumThreshold(Map<String, Object> config)
+    {
+        String minimumThresholdConfigValue = (String) 
config.get(MINIMUM_THRESHOLD_CONFIG_PROPERTY);
+        long minimumThresholdInMs;
+        if (minimumThresholdConfigValue != null)
+        {
+            try
+            {
+                minimumThresholdInMs = new 
DurationSpec.IntMinutesBound(minimumThresholdConfigValue).to(MILLISECONDS);
+            }
+            catch (Throwable t)
+            {
+                throw new IllegalArgumentException("Unable to parse " + 
MINIMUM_THRESHOLD_CONFIG_PROPERTY
+                                                   + " property for 
check_data_resurrection startup check.");
+            }
+        }
+        else
+        {
+            minimumThresholdInMs = 0;
+        }
+
+        if (minimumThresholdInMs == 0)

Review Comment:
   How about printing this warning when both minimumThresholdInMs is 0 and also 
grace period is 0 (or too low)? This avoids warning for all existing clusters 
upgrading to this or not intending to use this minimumThresholdInMs?



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