blambov commented on code in PR #2966:
URL: https://github.com/apache/cassandra/pull/2966#discussion_r1432775426
##########
src/java/org/apache/cassandra/db/compaction/unified/Controller.java:
##########
@@ -596,10 +598,15 @@ public static Map<String, String>
validateOptions(Map<String, String> options) t
try
{
long sizeInBytes = FBUtilities.parseHumanReadableBytes(s);
+ // zero is a valid option to disable featue
if (sizeInBytes < 0)
- throw new ConfigurationException(String.format("Invalid
configuration, %s should be positive: %s",
-
MIN_SSTABLE_SIZE_OPTION,
- s));
+ throw new ConfigurationException(String.format("Invalid
configuration, %s should be greater than or equal to 0 (zero)",
+
MIN_SSTABLE_SIZE_OPTION));
+ int limit = (int) Math.ceil(targetSSTableSize *
INVERSE_SQRT_2);
+ if (sizeInBytes >= limit )
+ throw new ConfigurationException(String.format("Invalid
configuration, %s (%sB) should be less than: %sB",
Review Comment:
I understand the problem now, but it's not something I personally would mind
with the current phrasing of the exception.
When told e.g. "less than 707.106MiB", wouldn't people try "707.105MiB"?
--
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]