isaacreath commented on code in PR #4737:
URL: https://github.com/apache/cassandra/pull/4737#discussion_r3073238522
##########
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)
+ {
+ LOGGER.warn(MINIMUM_THRESHOLD_CONFIG_PROPERTY + " property for
check_data_resurrection startup check " +
+ "is not set or is set to 0s. Consider to increase the
default value as the " +
+ "startup check might fail the startup of the node when
gc_grace_seconds for user tables " +
+ "is set very low and the node is restarted.");
Review Comment:
A couple of nits for this error message to improve readability:
`Consider to increase` -> `Consider increasing`
`might fail the startup of the node` -> `might prevent the startup of the
node`
In full:
```
Consider increasing the default value as the startup check might prevent the
startup of the node when gc_grace_seconds for user tables is set very low and
the node is restarted.
```
--
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]