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

  1. Set cdc_on_repair_enabled: false in cassandra.yaml
  2. Or run a non-incremental (full) repair instead
  3. 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

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


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)