Skip to content

Commit 623483d

Browse files
CNDB-15581: CDNB-15253: ninja-fix for ant check
Rebase notes: - squash into previous commit (9a21657)
1 parent 9a21657 commit 623483d

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/java/org/apache/cassandra/config/CassandraRelevantProperties.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,16 @@ public enum CassandraRelevantProperties
10121012
/** Set this property to true in order to use DSE-like histogram bucket boundaries and behaviour */
10131013
USE_DSE_COMPATIBLE_HISTOGRAM_BOUNDARIES("cassandra.use_dse_compatible_histogram_boundaries", "false"),
10141014
USE_DYNAMIC_SNITCH_FOR_COUNTER_LEADER("cassandra.counter_leader.use_dynamic_snitch", "false"),
1015+
1016+
/**
1017+
* Whether to use factorization-based shard count growth for smoother progression when base_shard_count is not power of 2.
1018+
* When enabled (default: true), instead of using power-of-two jumps like 1→2→8→1000, the system will
1019+
* use prime factorization to create smooth sequences like 1→5→25→125→250→500→1000 for num_shards=1000.
1020+
* This prevents the large jumps that were involved in the data loss incident caused by HCD-130
1021+
* <p>
1022+
*/
1023+
USE_FACTORIZATION_SHARD_COUNT_GROWTH("use_factorization_shard_count_growth", "true"),
1024+
10151025
/** Set this property to true in order to switch to micrometer metrics */
10161026
USE_MICROMETER("cassandra.use_micrometer_metrics", "false"),
10171027
/** When enabled, recursive directory deletion will be executed using a unix command `rm -rf` instead of traversing

src/java/org/apache/cassandra/db/compaction/unified/Controller.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,14 +322,7 @@ public abstract class Controller
322322
static final String MAX_SSTABLES_PER_SHARD_FACTOR_OPTION = "max_sstables_per_shard_factor";
323323
static final double DEFAULT_MAX_SSTABLES_PER_SHARD_FACTOR = UCS_MAX_SSTABLES_PER_SHARD_FACTOR.getDoubleWithLegacyFallback();
324324

325-
/**
326-
* Whether to use factorization-based shard count growth for smoother progression when base_shard_count is not power of 2.
327-
* When enabled (default: true), instead of using power-of-two jumps like 1→2→8→1000, the system will
328-
* use prime factorization to create smooth sequences like 1→5→25→125→250→500→1000 for num_shards=1000.
329-
* This prevents the large jumps that were involved in the data loss incident caused by HCD-130
330-
* <p>
331-
*/
332-
static final boolean USE_FACTORIZATION_SHARD_COUNT_GROWTH = Boolean.parseBoolean(System.getProperty("use_factorization_shard_count_growth", "true"));
325+
static final boolean USE_FACTORIZATION_SHARD_COUNT_GROWTH = CassandraRelevantProperties.USE_FACTORIZATION_SHARD_COUNT_GROWTH.getBoolean();
333326

334327
protected final MonotonicClock clock;
335328
protected final Environment env;

test/unit/org/apache/cassandra/db/compaction/unified/ControllerTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import java.util.Arrays;
2020
import java.util.HashMap;
21-
import java.util.List;
2221
import java.util.Map;
2322
import java.util.concurrent.ScheduledExecutorService;
2423
import java.util.concurrent.ScheduledFuture;

0 commit comments

Comments
 (0)