{"record":{"id":"6abf10424b402436","repo":"apache/cassandra","slug":"cannot-run-incremental-repair-while-cdc-replay-is","errorCode":null,"errorMessage":"Cannot run incremental repair while CDC replay is enabled. Set cdc_on_repair_enabled to false.","messagePattern":"Cannot run incremental repair while CDC replay is enabled\\. Set cdc_on_repair_enabled to false\\.","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/AutoRepairService.java","lineNumber":83,"sourceCode":"\n    public void checkCanRun(String repairType)\n    {\n        checkCanRun(RepairType.parse(repairType));\n    }\n\n    public void checkCanRun(RepairType repairType)\n    {\n        if (!config.isAutoRepairSchedulingEnabled())\n            throw new ConfigurationException(\"Auto-repair scheduler is disabled.\");\n\n        if (repairType != RepairType.INCREMENTAL)\n            return;\n\n        if (config.getMaterializedViewRepairEnabled(repairType) && DatabaseDescriptor.isMaterializedViewsOnRepairEnabled())\n            throw new ConfigurationException(\"Cannot run incremental repair while materialized view replay is enabled. Set materialized_views_on_repair_enabled to false.\");\n\n        if (DatabaseDescriptor.isCDCEnabled() && DatabaseDescriptor.isCDCOnRepairEnabled())\n            throw new ConfigurationException(\"Cannot run incremental repair while CDC replay is enabled. Set cdc_on_repair_enabled to false.\");\n    }\n\n    public AutoRepairConfig getAutoRepairConfig()\n    {\n        return config;\n    }\n\n    @Override\n    public boolean isAutoRepairDisabled()\n    {\n        return config == null || !config.isAutoRepairSchedulingEnabled();\n    }\n\n    @Override\n    public String getAutoRepairConfiguration()\n    {\n        StringBuilder sb = new StringBuilder();\n        sb.append(\"repair scheduler configuration:\");","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/AutoRepairService.java#L65-L101","documentation":"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.","triggerScenarios":"Calling checkCanRun(RepairType.INCREMENTAL) when DatabaseDescriptor.isCDCEnabled() is true AND DatabaseDescriptor.isCDCOnRepairEnabled() is true.","commonSituations":"CDC-enabled tables on clusters that also enable CDC-on-repair; incremental repairs scheduled automatically without adjusting CDC settings.","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"],"exampleFix":"// cassandra.yaml\n// before\ncdc_on_repair_enabled: true\n// after\ncdc_on_repair_enabled: false","handlingStrategy":"validation","validationCode":"if (repairType == RepairType.INCREMENTAL\n    && org.apache.cassandra.config.DatabaseDescriptor.isCDCEnabled()\n    && org.apache.cassandra.config.DatabaseDescriptor.isCDCOnRepairEnabled())\n    throw new IllegalStateException(\"Disable cdc_on_repair_enabled before incremental repair\");\nautoRepairService.checkCanRun(repairType);","typeGuard":null,"tryCatchPattern":"try { autoRepairService.checkCanRun(RepairType.INCREMENTAL); } catch (ConfigurationException e) { logger.warn(\"Incremental repair blocked: {}\", e.getMessage()); }","preventionTips":["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"],"tags":["repair","configuration","cdc"],"backgroundTag":"conflicting-config-options","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}