apache/cassandra · error · ConfigurationException

write_tombstone_warn_threshold (%d) cannot be less than min_

Error message

write_tombstone_warn_threshold (%d) cannot be less than min_tracked_partition_tombstone_count (%d)

What it means

When enabled (not -1), write_tombstone_warn_threshold must be >= min_tracked_partition_tombstone_count; warning about tombstones that fall below the tracking floor is contradictory. validateWriteTombstoneThresholdRange throws this ConfigurationException otherwise.

Source

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

                                                           name + "_warn_threshold", warn));
    }

    private static void validateWriteSizeThreshold(DataStorageSpec.LongBytesBound writeSizeWarn, DataStorageSpec.LongBytesBound minTrackedSize)
    {
        if (writeSizeWarn != null && minTrackedSize != null)
        {
            if (writeSizeWarn.toBytes() < minTrackedSize.toBytes())
                throw new ConfigurationException(String.format("write_size_warn_threshold (%s) cannot be less than min_tracked_partition_size (%s)", writeSizeWarn, minTrackedSize));
        }
    }

    private static void validateWriteTombstoneThresholdRange(int writeTombstoneWarn, long minTrackedTombstoneCount)
    {
        if (writeTombstoneWarn < -1)
            throw new ConfigurationException(String.format("write_tombstone_warn_threshold (%d) must be -1 (disabled) or >= 0", writeTombstoneWarn));

        if (writeTombstoneWarn != -1 && writeTombstoneWarn < minTrackedTombstoneCount)
            throw new ConfigurationException(String.format("write_tombstone_warn_threshold (%d) cannot be less than min_tracked_partition_tombstone_count (%d)",
                                                           writeTombstoneWarn, minTrackedTombstoneCount));
    }

    public static GuardrailsOptions getGuardrailsConfig()
    {
        return guardrails;
    }

    private static void applyGuardrails()
    {
        try
        {
            guardrails = new GuardrailsOptions(conf);
        }
        catch (IllegalArgumentException e)
        {
            throw new ConfigurationException("Invalid guardrails configuration: " + e.getMessage(), e);
        }

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Raise write_tombstone_warn_threshold to >= min_tracked_partition_tombstone_count
  2. Lower min_tracked_partition_tombstone_count below the warn threshold
  3. Set write_tombstone_warn_threshold to -1 if you want no warn gate
  4. Keep the two values reviewed together when tuning

Example fix

// before (cassandra.yaml)
write_tombstone_warn_threshold: 1000
min_tracked_partition_tombstone_count: 5000
// after
write_tombstone_warn_threshold: 10000
min_tracked_partition_tombstone_count: 5000
Defensive patterns

Strategy: validation

Validate before calling

if (conf.write_tombstone_warn_threshold != -1
    && conf.write_tombstone_warn_threshold < conf.min_tracked_partition_tombstone_count)
    throw new IllegalArgumentException("warn threshold below min tracked tombstone count");

Try / catch

try { DatabaseDescriptor.daemonInitialization(); } catch (ConfigurationException e) { LOG.error("Tombstone thresholds invalid: " + e.getMessage()); System.exit(1); }

Prevention

When it happens

Trigger: cassandra.yaml where write_tombstone_warn_threshold (>=0) < min_tracked_partition_tombstone_count, validated at startup by DatabaseDescriptor.

Common situations: Raising min_tracked_partition_tombstone_count to reduce overhead but leaving the old warn threshold; tuning one knob in one upgrade and not the paired one; units confusion (thresholds are counts, easy to mix with size settings).

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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