smiklosovic commented on code in PR #2046:
URL: https://github.com/apache/cassandra/pull/2046#discussion_r1053492515
##########
src/java/org/apache/cassandra/gms/Gossiper.java:
##########
@@ -257,18 +262,17 @@ public void expireUpgradeFromVersion()
((ExpiringMemoizingSupplier<CassandraVersion>)
upgradeFromVersionMemoized).expire();
}
- private static final boolean disableThreadValidation =
Boolean.getBoolean(Props.DISABLE_THREAD_VALIDATION);
+ private static final boolean disableThreadValidation =
GOSSIP_DISABLE_THREAD_VALIDATION.getBoolean();
private static volatile boolean disableEndpointRemoval =
DISABLE_GOSSIP_ENDPOINT_REMOVAL.getBoolean();
private static long getVeryLongTime()
{
- String newVLT = System.getProperty("cassandra.very_long_time_ms");
- if (newVLT != null)
- {
- logger.info("Overriding aVeryLongTime to {}ms", newVLT);
- return Long.parseLong(newVLT);
- }
- return 259200 * 1000; // 3 days
+ long time = VERY_LONG_TIME_MS.getLong();
Review Comment:
we can do better here, you also do not negate that `if`. We are overriding
when it is _not_ equal to default.
````
private static long getVeryLongTime()
{
long time = VERY_LONG_TIME_MS.getLong();
String defaultValue = VERY_LONG_TIME_MS.getDefaultValue();
if (!String.valueOf(time).equals(defaultValue))
logger.info("Overriding {} from {} to {}ms",
VERY_LONG_TIME_MS.getKey(), defaultValue, time);
return time;
}
````
--
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]