Claudenw commented on code in PR #3168:
URL: https://github.com/apache/cassandra/pull/3168#discussion_r1537120556
##########
src/java/org/apache/cassandra/io/sstable/format/DataComponent.java:
##########
@@ -88,8 +88,12 @@ private static CompressionParams
buildCompressionParams(TableMetadata metadata,
case fast:
if
(!compressor.recommendedUses().contains(ICompressor.Uses.FAST_COMPRESSION))
{
- // The default compressor is generally fast (LZ4 with
16KiB block size)
- compressionParams = CompressionParams.DEFAULT;
+ // The default compressor is generally Fast, but just
in case we verify it.
+ compressionParams =
CompressionParams.defaultParams(metadata.keyspace);
+ compressor = compressionParams.getSstableCompressor();
+ if
(!compressor.recommendedUses().contains(ICompressor.Uses.FAST_COMPRESSION)) {
+ compressionParams = CompressionParams.FAST;
Review Comment:
This ensures that the system works as it did before. Previously, if the
compression associated with the table was not fast, the system would use
DEFAULT. However, we have added a step where the user can define the default
compression used for tables so we have to check that. If it is 'fast' use it,
if it is not fast use the default FAST one.
--
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]