apache/cassandra · error · java.lang.IllegalArgumentException
Threshold value for gc_concurrent_phase_warn_threshold
Error message
Threshold value for gc_concurrent_phase_warn_threshold (%d) must be greater than gc_concurrent_phase_log_threshold which is currently %d
What it means
setGCConcurrentPhaseWarnThreshold requires that a non-zero warn threshold be strictly greater than the current gc_concurrent_phase_log_threshold, mirroring the log-threshold check. A warn threshold <= the log threshold would make the warning impossible to trigger before logging, so it is rejected.
Solutions
- Raise the warn threshold strictly above getGCConcurrentPhaseLogThreshold()
- Lower the log threshold first via setGCConcurrentPhaseLogThreshold
- Set the warn threshold to 0 to disable it
Example fix
// before DatabaseDescriptor.setGCConcurrentPhaseLogThreshold(10000); DatabaseDescriptor.setGCConcurrentPhaseWarnThreshold(5000); // throws // after DatabaseDescriptor.setGCConcurrentPhaseWarnThreshold(20000); DatabaseDescriptor.setGCConcurrentPhaseLogThreshold(10000);
Defensive patterns
Strategy: validation
Validate before calling
if (warnMs != 0 && warnMs <= DatabaseDescriptor.getGCConcurrentPhaseLogThreshold()) throw new IllegalArgumentException("gc_concurrent_phase_warn_threshold must exceed log threshold"); Try / catch
try { DatabaseDescriptor.setGCConcurrentPhaseWarnThreshold(warn); } catch (IllegalArgumentException e) { logger.error("gc threshold ordering violated: {}", e.getMessage()); } Prevention
- Set warn threshold before log threshold, or re-read current values first
- Enforce warn > log ordering in config validation
- Document that 0 disables the warn threshold
When it happens
Trigger: Calling setGCConcurrentPhaseWarnThreshold(threshold) where threshold != 0 and threshold <= getGCConcurrentPhaseLogThreshold(); e.g. warn=5000 with log=10000.
Common situations: Config edits where gc_concurrent_phase_warn_threshold was lowered below or set equal to gc_concurrent_phase_log_threshold; programmatic setters called out of order.
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
- Threshold value for gc_concurrent_phase_log_threshold
- Threshold value for gc_warn_threshold
- Threshold must be greater than 0
- Threshold must be less than Integer.MAX_VALUE
- Threshold value for gc_concurrent_phase_warn_threshold must…
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/0073f4a83b04db56.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:5084
throw new IllegalArgumentException("Threshold value for gc_concurrent_phase_log_threshold (" + threshold + ") must be less than gc_concurrent_phase_warn_threshold which is currently "
+ gcConcurrentPhaseWarnThresholdInMs);
conf.gc_concurrent_phase_log_threshold = new DurationSpec.IntMillisecondsBound(threshold);
}
public static int getGCConcurrentPhaseWarnThreshold()
{
return conf.gc_concurrent_phase_warn_threshold.toMilliseconds();
}
public static void setGCConcurrentPhaseWarnThreshold(int threshold)
{
if (threshold < 0)
throw new IllegalArgumentException("Threshold value for gc_concurrent_phase_warn_threshold must be greater than or equal to 0");
long gcConcurrentPhaseLogThresholdInMs = getGCConcurrentPhaseLogThreshold();
if (threshold != 0 && threshold <= gcConcurrentPhaseLogThresholdInMs)
throw new IllegalArgumentException("Threshold value for gc_concurrent_phase_warn_threshold (" + threshold + ") must be greater than gc_concurrent_phase_log_threshold which is currently "
+ gcConcurrentPhaseLogThresholdInMs);
conf.gc_concurrent_phase_warn_threshold = new DurationSpec.IntMillisecondsBound(threshold);
}
public static boolean isCDCEnabled()
{
return conf.cdc_enabled;
}
@VisibleForTesting
public static void setCDCEnabled(boolean cdc_enabled)
{
conf.cdc_enabled = cdc_enabled;
}
public static boolean getCDCBlockWrites()
{View on GitHub (pinned to 88fd0f6a0e)