apache/cassandra · error · ConfigurationException
Cannot run incremental repair while CDC replay is enabled…
Error message
Cannot run incremental repair while CDC replay is enabled. Set cdc_on_repair_enabled to false.
What it means
For incremental repair, checkCanRun also rejects running when both CDC is enabled on the node and cdc_on_repair_enabled is true, because CDC replay during incremental repair is unsupported. It throws ConfigurationException directing the user to disable cdc_on_repair_enabled.
Solutions
- Set cdc_on_repair_enabled: false in cassandra.yaml
- Or run a non-incremental (full) repair instead
- Or disable CDC on the affected tables if replay semantics are not required
Example fix
// cassandra.yaml // before cdc_on_repair_enabled: true // after cdc_on_repair_enabled: false
Defensive patterns
Strategy: validation
Validate before calling
if (repairType == RepairType.INCREMENTAL
&& org.apache.cassandra.config.DatabaseDescriptor.isCDCEnabled()
&& org.apache.cassandra.config.DatabaseDescriptor.isCDCOnRepairEnabled())
throw new IllegalStateException("Disable cdc_on_repair_enabled before incremental repair");
autoRepairService.checkCanRun(repairType); Try / catch
try { autoRepairService.checkCanRun(RepairType.INCREMENTAL); } catch (ConfigurationException e) { logger.warn("Incremental repair blocked: {}", e.getMessage()); } Prevention
- Check CDC flags before scheduling incremental repairs on CDC-enabled clusters
- Run full repairs when CDC-on-replay is required
- Validate the combination of cdc_enabled and cdc_on_repair_enabled in config CI checks
When it happens
Trigger: Calling checkCanRun(RepairType.INCREMENTAL) when DatabaseDescriptor.isCDCEnabled() is true AND DatabaseDescriptor.isCDCOnRepairEnabled() is true.
Common situations: CDC-enabled tables on clusters that also enable CDC-on-repair; incremental repairs scheduled automatically without adjusting CDC settings.
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
- Auto-repair scheduler is disabled.
- Can only safely increase number of transients one at a time…
- Cannot run incremental repair while materialized view…
- Cannot set concurrent_validations greater than…
- Cannot set repair_session_max_tree_depth to which is < 10…
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/6abf10424b402436.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/service/AutoRepairService.java:83
public void checkCanRun(String repairType)
{
checkCanRun(RepairType.parse(repairType));
}
public void checkCanRun(RepairType repairType)
{
if (!config.isAutoRepairSchedulingEnabled())
throw new ConfigurationException("Auto-repair scheduler is disabled.");
if (repairType != RepairType.INCREMENTAL)
return;
if (config.getMaterializedViewRepairEnabled(repairType) && DatabaseDescriptor.isMaterializedViewsOnRepairEnabled())
throw new ConfigurationException("Cannot run incremental repair while materialized view replay is enabled. Set materialized_views_on_repair_enabled to false.");
if (DatabaseDescriptor.isCDCEnabled() && DatabaseDescriptor.isCDCOnRepairEnabled())
throw new ConfigurationException("Cannot run incremental repair while CDC replay is enabled. Set cdc_on_repair_enabled to false.");
}
public AutoRepairConfig getAutoRepairConfig()
{
return config;
}
@Override
public boolean isAutoRepairDisabled()
{
return config == null || !config.isAutoRepairSchedulingEnabled();
}
@Override
public String getAutoRepairConfiguration()
{
StringBuilder sb = new StringBuilder();
sb.append("repair scheduler configuration:");View on GitHub (pinned to 88fd0f6a0e)