ethan-brown2022 commented on code in PR #2966:
URL: https://github.com/apache/cassandra/pull/2966#discussion_r1420840834
##########
src/java/org/apache/cassandra/db/compaction/unified/Controller.java:
##########
@@ -596,10 +598,10 @@ public static Map<String, String>
validateOptions(Map<String, String> options) t
try
{
long sizeInBytes = FBUtilities.parseHumanReadableBytes(s);
- if (sizeInBytes < 0)
- throw new ConfigurationException(String.format("Invalid
configuration, %s should be positive: %s",
+ if (sizeInBytes < targetSSTableSize)
Review Comment:
> UCS aims to produce sstables with size between t/2 and t⋅2 (More
information can be found
[here](https://github.com/apache/cassandra/blob/cassandra-5.0/src/java/org/apache/cassandra/db/compaction/UnifiedCompactionStrategy.md)).
We should verify that `sizeInBytes > targetSSTableSize * INVERSE_SQRT_2`
Sorry, I made a mistake in my previous comment. This is supposed to say
`sizeInBytes < targetSSTableSize * INVERSE_SQRT_2`
`min_sstable_size` should be < `targetSSTableSize * INVERSE_SQRT_2`, so if
`sizeInBytes > targetSSTableSize * INVERSE_SQRT_2` we should throw an
exception. In this case, we should continue to make sure that `sizeInBytes` is
not < 0. Sorry for the confusion.
##########
src/java/org/apache/cassandra/db/compaction/unified/Controller.java:
##########
@@ -596,10 +598,10 @@ public static Map<String, String>
validateOptions(Map<String, String> options) t
try
{
long sizeInBytes = FBUtilities.parseHumanReadableBytes(s);
- if (sizeInBytes < 0)
- throw new ConfigurationException(String.format("Invalid
configuration, %s should be positive: %s",
+ if (sizeInBytes < targetSSTableSize)
Review Comment:
> UCS aims to produce sstables with size between t/2 and t⋅2 (More
information can be found
[here](https://github.com/apache/cassandra/blob/cassandra-5.0/src/java/org/apache/cassandra/db/compaction/UnifiedCompactionStrategy.md)).
We should verify that `sizeInBytes > targetSSTableSize * INVERSE_SQRT_2`
Sorry, I made a mistake in my previous comment. This is supposed to say
`sizeInBytes < targetSSTableSize * INVERSE_SQRT_2`
`min_sstable_size` should be < `targetSSTableSize * INVERSE_SQRT_2`, so if
`sizeInBytes > targetSSTableSize * INVERSE_SQRT_2` we should throw an
exception. In this case, we should continue to make sure that `sizeInBytes` is
not < 0. Sorry for the confusion.
--
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]