apache/cassandra · error · java.lang.IllegalArgumentException
Threshold value for gc_concurrent_phase_log_threshold
Error message
Threshold value for gc_concurrent_phase_log_threshold (%d) must be less than gc_concurrent_phase_warn_threshold which is currently %d
What it means
setGCConcurrentPhaseLogThreshold enforces ordering with the warn threshold: when a warn threshold is active (non-zero), the log threshold must be strictly less than it. A log threshold >= warn threshold is rejected because it would never fire before the warn condition.
Solutions
- Lower the log threshold to be strictly less than getGCConcurrentPhaseWarnThreshold()
- Raise gc_concurrent_phase_warn_threshold first via setGCConcurrentPhaseWarnThreshold
- Set the warn threshold to 0 to disable the cross-check
Example fix
// before DatabaseDescriptor.setGCConcurrentPhaseWarnThreshold(10000); DatabaseDescriptor.setGCConcurrentPhaseLogThreshold(20000); // throws // after DatabaseDescriptor.setGCConcurrentPhaseWarnThreshold(30000); DatabaseDescriptor.setGCConcurrentPhaseLogThreshold(20000);
Defensive patterns
Strategy: validation
Validate before calling
if (logMs >= DatabaseDescriptor.getGCConcurrentPhaseWarnThreshold() && DatabaseDescriptor.getGCConcurrentPhaseWarnThreshold() != 0) throw new IllegalArgumentException("gc_concurrent_phase_log_threshold must be < warn threshold"); Try / catch
try { DatabaseDescriptor.setGCConcurrentPhaseLogThreshold(log); } catch (IllegalArgumentException e) { logger.error("gc threshold ordering violated: {}", e.getMessage()); } Prevention
- Set the warn threshold first, then the log threshold
- Enforce log < warn invariant in your config validation layer
- Keep gc_concurrent_phase_warn_threshold > gc_concurrent_phase_log_threshold in cassandra.yaml
When it happens
Trigger: Calling setGCConcurrentPhaseLogThreshold(threshold) while getGCConcurrentPhaseWarnThreshold() is non-zero and threshold >= that warn threshold; e.g. log=20000 with warn=10000.
Common situations: cassandra.yaml where gc_concurrent_phase_log_threshold was raised above or set equal to gc_concurrent_phase_warn_threshold, or programmatic updates applied in the wrong 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_warn_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/32152c144431d24e.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:5066
throw new IllegalArgumentException("Threshold value for gc_warn_threshold (" + threshold + ") must be greater than gc_log_threshold which is currently "
+ gcLogThresholdInMs);
conf.gc_warn_threshold = new DurationSpec.IntMillisecondsBound(threshold);
}
public static int getGCConcurrentPhaseLogThreshold()
{
return conf.gc_concurrent_phase_log_threshold.toMilliseconds();
}
public static void setGCConcurrentPhaseLogThreshold(int threshold)
{
if (threshold <= 0)
throw new IllegalArgumentException("Threshold must be greater than 0");
long gcConcurrentPhaseWarnThresholdInMs = getGCConcurrentPhaseWarnThreshold();
if (gcConcurrentPhaseWarnThresholdInMs != 0 && threshold > gcConcurrentPhaseWarnThresholdInMs)
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 "View on GitHub (pinned to 88fd0f6a0e)