You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by dc...@apache.org on 2026/01/09 20:31:28 UTC

(cassandra) branch trunk updated: When level compaction validates its table properties, it used the wrong default value for sstable_size_in_mb which allowed properties that would later be rejected at runtime

This is an automated email from the ASF dual-hosted git repository.

dcapwell pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 8d11662d6d When level compaction validates its table properties, it used the wrong default value for sstable_size_in_mb which allowed properties that would later be rejected at runtime
8d11662d6d is described below

commit 8d11662d6d2a4a91c25f17aa70e2f56208cd7eb1
Author: David Capwell <dc...@apache.org>
AuthorDate: Fri Jan 9 12:30:38 2026 -0800

    When level compaction validates its table properties, it used the wrong default value for sstable_size_in_mb which allowed properties that would later be rejected at runtime
    
    patch by David Capwell; reviewed by Ariel Weisberg for CASSANDRA-20570
---
 CHANGES.txt                                                             | 1 +
 .../org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 7937add486..9c7596301e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 5.1
+ * When level compaction validates its table properties, it used the wrong default value for sstable_size_in_mb which allowed properties that would later be rejected at runtime (CASSANDRA-20570)
  * Fix off-by-one bug in exponential backoff for repair retry config (CASSANDRA-21102)
  * Move training parameters for Zstd dictionary compression to CQL (CASSANDRA-21078)
  * Add configuration for sorted imports in source files (CASSANDRA-17925)
diff --git a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
index 527a1e8c65..438c9da182 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
@@ -594,7 +594,7 @@ public class LeveledCompactionStrategy extends AbstractCompactionStrategy
         int fanoutSize;
 
         // Validate the sstable_size option
-        String size = options.containsKey(SSTABLE_SIZE_OPTION) ? options.get(SSTABLE_SIZE_OPTION) : "1";
+        String size = options.containsKey(SSTABLE_SIZE_OPTION) ? options.get(SSTABLE_SIZE_OPTION) : String.valueOf(DEFAULT_MAX_SSTABLE_SIZE_MIB);
         try
         {
             ssSize = Integer.parseInt(size);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org