apache/cassandra · error · ConfigurationException
%s (%s) must be greater than or equal to %s (%s)
Error message
%s (%s) must be greater than or equal to %s (%s)
What it means
Read-related failure thresholds must be greater than or equal to their warn thresholds. validateReadThresholds compares fail.toBytes() against warn.toBytes() and throws this formatted ConfigurationException when the fail threshold is smaller than the warn threshold.
Source
Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:1368
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())
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));
View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Set the *_fail_threshold value >= the corresponding *_warn_threshold value
- Check both values' units/suffixes so byte comparison is as intended
- Read the exception's formatted values to see the actual parsed bounds
- Align warn/fail pairs whenever tuning either one
Example fix
// before (cassandra.yaml) read_size_warn_threshold: 64MiB read_size_fail_threshold: 32MiB // after read_size_warn_threshold: 64MiB read_size_fail_threshold: 128MiB
Defensive patterns
Strategy: validation
Validate before calling
if (readSizeFail != null && readSizeWarn != null && readSizeFail.toBytes() < readSizeWarn.toBytes())
throw new IllegalArgumentException("fail threshold must be >= warn threshold"); Try / catch
try { DatabaseDescriptor.daemonInitialization(); } catch (ConfigurationException e) { LOG.error("Read threshold ordering invalid: " + e.getMessage()); System.exit(1); } Prevention
- Always keep fail >= warn pairs
- Write thresholds in the same unit to ease comparison
- Review warn/fail pairs in config diffs
- Read the formatted exception values to find the pair
When it happens
Trigger: Config where e.g. read_size_fail_threshold (in bytes) < read_size_warn_threshold, or coordinator_read_size_fail_threshold < coordinator_read_size_warn_threshold, checked during DatabaseDescriptor threshold validation at startup.
Common situations: Setting fail and warn thresholds in different units so the fail value converts smaller (e.g. warn in MiB, fail in KiB); incrementing warn without adjusting fail; copy-paste swapping the two values.
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
- write_size_warn_threshold (%s) cannot be less than min_track
- 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/793eb3babce6f239.
Report an issue: GitHub.