apache/cassandra · warning

Write thresholds require top partitions tracking to be enabl

Error message

Write thresholds require top partitions tracking to be enabled

What it means

Cassandra emits this warning at startup config validation when write size/tombstone thresholds are enabled but top-partition tracking (top_partitions_enabled) is off. Write thresholds are enforced using top-partition tracking data, so without it they cannot function. It is a non-fatal warning logged by DatabaseDescriptor during config sanity checks.

Source

Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:1359

    @VisibleForTesting
    static void applyRepairCommandPoolSize(Config config)
    {
        if (config.repair_command_pool_size < 1)
            config.repair_command_pool_size = config.concurrent_validations;
    }

    @VisibleForTesting
    static void applyThresholdsValidations(Config config)
    {
        // Validate read thresholds
        validateReadThresholds("coordinator_read_size", config.coordinator_read_size_warn_threshold, config.coordinator_read_size_fail_threshold);
        validateReadThresholds("local_read_size", config.local_read_size_warn_threshold, config.local_read_size_fail_threshold);
        validateReadThresholds("row_index_read_size", config.row_index_read_size_warn_threshold, config.row_index_read_size_fail_threshold);

        // Write threshold warning depends on top_partitions tracking
        if (config.write_thresholds_enabled && !config.top_partitions_enabled)
            logger.warn("Write thresholds require top partitions tracking to be enabled");

        validateWriteSizeThreshold(config.write_size_warn_threshold, config.min_tracked_partition_size);
        validateWriteTombstoneThresholdRange(config.write_tombstone_warn_threshold, config.min_tracked_partition_tombstone_count);
    }

    private static void validateReadThresholds(String name, DataStorageSpec.LongBytesBound warn, DataStorageSpec.LongBytesBound fail)
    {
        if (fail != null && warn != null && fail.toBytes() < warn.toBytes())
            throw new ConfigurationException(String.format("%s (%s) must be greater than or equal to %s (%s)",
                                                           name + "_fail_threshold", fail,
                                                           name + "_warn_threshold", warn));
    }

    private static void validateWriteSizeThreshold(DataStorageSpec.LongBytesBound writeSizeWarn, DataStorageSpec.LongBytesBound minTrackedSize)
    {
        if (writeSizeWarn != null && minTrackedSize != null)
        {
            if (writeSizeWarn.toBytes() < minTrackedSize.toBytes())

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Set top_partitions_enabled: true in cassandra.yaml alongside write_thresholds_enabled
  2. If top-partition tracking overhead is not wanted, set write_thresholds_enabled: false (or remove the write threshold settings)
  3. Restart Cassandra and confirm the warning is gone from the log

Example fix

// cassandra.yaml before
write_thresholds_enabled: true
// after
write_thresholds_enabled: true
top_partitions_enabled: true
Defensive patterns

Strategy: validation

Validate before calling

if (DatabaseDescriptor.getWriteThresholdsEnabled() && !DatabaseDescriptor.getTopPartitionsEnabled()) System.err.println("Enable top_partitions_enabled before write thresholds");

Prevention

When it happens

Trigger: cassandra.yaml sets write_thresholds_enabled: true (or write_size_warn_threshold/write_tombstone_warn_threshold are set) while top_partitions_enabled is not set to true. Also occurs via validateThresholds() when the user table write thresholds were configured without enabling top partition tracking.

Common situations: Operators enabling the newer write-size warning thresholds after upgrading, but missing the prerequisite top_partitions_enabled flag; copy-pasted yaml snippets where only half the required flags were carried over.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/0497351f8a5cc773. Report an issue: GitHub.