apache/cassandra · error · ConfigurationException
write_size_warn_threshold (%s) cannot be less than min_track
Error message
write_size_warn_threshold (%s) cannot be less than min_tracked_partition_size (%s)
What it means
write_size_warn_threshold cannot be below min_tracked_partition_size: the warn gate must trigger no earlier than partitions start being tracked, otherwise tracking is meaningless. validateWriteSizeThreshold throws this ConfigurationException when writeSizeWarn.toBytes() < minTrackedSize.toBytes().
Source
Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:1378
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())
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;
}
View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Raise write_size_warn_threshold to be >= min_tracked_partition_size
- Lower min_tracked_partition_size below the warn threshold
- Verify unit suffixes so the byte comparison matches intent
- Use the exception values to see exactly which parsed bounds conflict
Example fix
// before (cassandra.yaml) write_size_warn_threshold: 4MiB min_tracked_partition_size: 8MiB // after write_size_warn_threshold: 16MiB min_tracked_partition_size: 8MiB
Defensive patterns
Strategy: validation
Validate before calling
if (writeSizeWarn != null && minTrackedSize != null && writeSizeWarn.toBytes() < minTrackedSize.toBytes())
throw new IllegalArgumentException("write_size_warn_threshold < min_tracked_partition_size"); Try / catch
try { DatabaseDescriptor.daemonInitialization(); } catch (ConfigurationException e) { LOG.error("Write size thresholds invalid: " + e.getMessage()); System.exit(1); } Prevention
- Keep write_size_warn_threshold >= min_tracked_partition_size
- Use consistent units for both settings
- Revisit paired thresholds on upgrades
- Validate yaml in CI before deploy
When it happens
Trigger: cassandra.yaml with write_size_warn_threshold smaller than min_tracked_partition_size (both non-null), validated at startup by DatabaseDescriptor.
Common situations: Lowering the warn threshold for earlier warnings without realizing it must stay above the tracking floor; units mismatch making the warn value smaller in bytes; upgrading and carrying over older defaults that now conflict.
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
- %s (%s) must be greater than or equal to %s (%s)
- Invalid data rate: value must be non-negative
- Invalid data storage: %s Accepted units:%s
- Invalid value of entire_sstable_stream_throughput_outbound:
- Invalid value of entire_sstable_inter_dc_stream_throughput_o
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/adfb82acc8caa66a.
Report an issue: GitHub.