dcapwell commented on a change in pull request #1335:
URL: https://github.com/apache/cassandra/pull/1335#discussion_r808406214
##########
File path: src/java/org/apache/cassandra/config/Converters.java
##########
@@ -83,7 +67,36 @@
*/
MEGABITS_TO_MEBIBYTES_PER_SECOND_DATA_RATE(Long.class,
o ->
DataRateSpec.megabitsPerSecondInMebibytesPerSecond((Long)o),
- o ->
((DataRateSpec)o).toMegabitsPerSecondAsInt());
+ o ->
((DataRateSpec)o).toMegabitsPerSecondAsInt()),
+
+ /**
+ * This converter is used to support backward compatibility for parameters
where in the past -1 was used as a value
+ * Example: credentials_update_interval_in_ms = -1 and
credentials_update_interval = null (quantity of 0ms) are equal.
+ */
+ MILLIS_CUSTOM_DURATION(Long.class,
+ o -> (Long)o == -1 ? new
SmallestDurationMilliseconds("0ms") :
SmallestDurationMilliseconds.inMilliseconds((Long) o),
Review comment:
yep, `-1` means disabled; can't change
--
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]