maedhroz commented on code in PR #1754:
URL: https://github.com/apache/cassandra/pull/1754#discussion_r931562398
##########
src/java/org/apache/cassandra/config/DatabaseDescriptor.java:
##########
@@ -906,6 +898,36 @@ else if (conf.max_value_size.toMebibytes() >= 2048)
logInitializationOutcome(logger);
}
+ @VisibleForTesting
+ static void validateUpperBoundStreamingConfig() throws
ConfigurationException
+ {
+ // below 2 checks are needed in order to match the pre-CASSANDRA-15234
upper bound for those parameters which were still in megabits per second
+ if (conf.stream_throughput_outbound.toMegabitsPerSecond() >=
Integer.MAX_VALUE)
+ {
+ throw new ConfigurationException("Invalid value of
stream_throughput_outbound: " + conf.stream_throughput_outbound.toString(),
false);
Review Comment:
nit: It might be helpful to mention why something is invalid (i.e. the value
overflows int bounds when converted to megabits) in the error message, but if
this is only used for testing, I guess it's not a huge concern.
--
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]