Lower default chunk_length_in_kb from 64kb to 16kb

Patch by Ariel Weisberg; Reviewed by Jon Haddad for CASSANDRA-13241
This commit is contained in:
Ariel Weisberg 2018-10-22 16:44:33 -04:00
parent 801cb70ee8
commit caf50de31b
5 changed files with 13 additions and 9 deletions

View File

@ -1,4 +1,5 @@
4.0
* Lower default chunk_length_in_kb from 64kb to 16kb (CASSANDRA-13241)
* Startup checker should wait for count rather than percentage (CASSANDRA-14297)
* Fix incorrect sorting of replicas in SimpleStrategy.calculateNaturalReplicas (CASSANDRA-14862)
* Partitioned outbound internode TCP connections can occur when nodes restart (CASSANDRA-14358)

View File

@ -108,6 +108,9 @@ New features
Upgrading
---------
- CASSANDRA-13241 lowered the default chunk_lengh_in_kb for compresesd tables from
64kb to 16kb. For highly compressible data this can have a noticeable impact
on space utilization. You may want to consider manually specifying this value.
- Additional columns have been added to system_distributed.repair_history,
system_traces.sessions and system_traces.events. As a result select * queries
againsts these tables will fail and generate an error in the log

View File

@ -55,7 +55,7 @@ public final class CompressionParams
private static volatile boolean hasLoggedChunkLengthWarning;
private static volatile boolean hasLoggedCrcCheckChanceWarning;
public static final int DEFAULT_CHUNK_LENGTH = 65536;
public static final int DEFAULT_CHUNK_LENGTH = 1024 * 16;
public static final double DEFAULT_MIN_COMPRESS_RATIO = 0.0; // Since pre-4.0 versions do not understand the
// new compression parameter we can't use a
// different default value.

View File

@ -347,7 +347,7 @@ public class AlterTest extends CQLTester
SchemaKeyspace.TABLES),
KEYSPACE,
currentTable()),
row(map("chunk_length_in_kb", "64", "class", "org.apache.cassandra.io.compress.LZ4Compressor")));
row(map("chunk_length_in_kb", "16", "class", "org.apache.cassandra.io.compress.LZ4Compressor")));
execute("ALTER TABLE %s WITH compression = { 'class' : 'SnappyCompressor', 'chunk_length_in_kb' : 32 };");
@ -374,7 +374,7 @@ public class AlterTest extends CQLTester
SchemaKeyspace.TABLES),
KEYSPACE,
currentTable()),
row(map("chunk_length_in_kb", "64", "class", "org.apache.cassandra.io.compress.LZ4Compressor", "min_compress_ratio", "2.0")));
row(map("chunk_length_in_kb", "16", "class", "org.apache.cassandra.io.compress.LZ4Compressor", "min_compress_ratio", "2.0")));
execute("ALTER TABLE %s WITH compression = { 'class' : 'LZ4Compressor', 'min_compress_ratio' : 1 };");
@ -383,7 +383,7 @@ public class AlterTest extends CQLTester
SchemaKeyspace.TABLES),
KEYSPACE,
currentTable()),
row(map("chunk_length_in_kb", "64", "class", "org.apache.cassandra.io.compress.LZ4Compressor", "min_compress_ratio", "1.0")));
row(map("chunk_length_in_kb", "16", "class", "org.apache.cassandra.io.compress.LZ4Compressor", "min_compress_ratio", "1.0")));
execute("ALTER TABLE %s WITH compression = { 'class' : 'LZ4Compressor', 'min_compress_ratio' : 0 };");
@ -392,7 +392,7 @@ public class AlterTest extends CQLTester
SchemaKeyspace.TABLES),
KEYSPACE,
currentTable()),
row(map("chunk_length_in_kb", "64", "class", "org.apache.cassandra.io.compress.LZ4Compressor")));
row(map("chunk_length_in_kb", "16", "class", "org.apache.cassandra.io.compress.LZ4Compressor")));
execute("ALTER TABLE %s WITH compression = { 'class' : 'SnappyCompressor', 'chunk_length_in_kb' : 32 };");
execute("ALTER TABLE %s WITH compression = { 'enabled' : 'false'};");

View File

@ -564,7 +564,7 @@ public class CreateTest extends CQLTester
SchemaKeyspace.TABLES),
KEYSPACE,
currentTable()),
row(map("chunk_length_in_kb", "64", "class", "org.apache.cassandra.io.compress.LZ4Compressor")));
row(map("chunk_length_in_kb", "16", "class", "org.apache.cassandra.io.compress.LZ4Compressor")));
createTable("CREATE TABLE %s (a text, b int, c int, primary key (a, b))"
+ " WITH compression = { 'class' : 'SnappyCompressor', 'chunk_length_in_kb' : 32 };");
@ -604,7 +604,7 @@ public class CreateTest extends CQLTester
SchemaKeyspace.TABLES),
KEYSPACE,
currentTable()),
row(map("chunk_length_in_kb", "64", "class", "org.apache.cassandra.io.compress.SnappyCompressor", "min_compress_ratio", "2.0")));
row(map("chunk_length_in_kb", "16", "class", "org.apache.cassandra.io.compress.SnappyCompressor", "min_compress_ratio", "2.0")));
createTable("CREATE TABLE %s (a text, b int, c int, primary key (a, b))"
+ " WITH compression = { 'sstable_compression' : 'SnappyCompressor', 'min_compress_ratio' : 1 };");
@ -614,7 +614,7 @@ public class CreateTest extends CQLTester
SchemaKeyspace.TABLES),
KEYSPACE,
currentTable()),
row(map("chunk_length_in_kb", "64", "class", "org.apache.cassandra.io.compress.SnappyCompressor", "min_compress_ratio", "1.0")));
row(map("chunk_length_in_kb", "16", "class", "org.apache.cassandra.io.compress.SnappyCompressor", "min_compress_ratio", "1.0")));
createTable("CREATE TABLE %s (a text, b int, c int, primary key (a, b))"
+ " WITH compression = { 'sstable_compression' : 'SnappyCompressor', 'min_compress_ratio' : 0 };");
@ -624,7 +624,7 @@ public class CreateTest extends CQLTester
SchemaKeyspace.TABLES),
KEYSPACE,
currentTable()),
row(map("chunk_length_in_kb", "64", "class", "org.apache.cassandra.io.compress.SnappyCompressor")));
row(map("chunk_length_in_kb", "16", "class", "org.apache.cassandra.io.compress.SnappyCompressor")));
createTable("CREATE TABLE %s (a text, b int, c int, primary key (a, b))"
+ " WITH compression = { 'sstable_compression' : '', 'chunk_length_kb' : 32 };");