apache/cassandra · error · ConfigurationException
Cannot run incremental repair while materialized view…
Error message
Cannot run incremental repair while materialized view replay is enabled. Set materialized_views_on_repair_enabled to false.
What it means
For incremental repair, checkCanRun rejects configurations where materialized-view repair and materialized_views_on_repair_enabled are both on, since MV replay during incremental repair is unsupported. It throws ConfigurationException with instructions to disable materialized_views_on_repair_enabled.
Solutions
- Set materialized_views_on_repair_enabled: false in cassandra.yaml
- Or use a non-incremental repair type (full repair) if MV replay must stay enabled
- Or disable materialized view repair for the incremental repair type
Example fix
// cassandra.yaml // before materialized_views_on_repair_enabled: true // after materialized_views_on_repair_enabled: false
Defensive patterns
Strategy: validation
Validate before calling
if (repairType == RepairType.INCREMENTAL
&& config.getMaterializedViewRepairEnabled(RepairType.INCREMENTAL)
&& org.apache.cassandra.config.DatabaseDescriptor.isMaterializedViewsOnRepairEnabled())
throw new IllegalStateException("Disable materialized_views_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
- Audit MV-related settings whenever switching repair type to incremental
- Prefer full repair when MV replay must stay enabled
- Keep cassandra.yaml settings reviewed together as a set (MV, CDC, repair)
When it happens
Trigger: Calling checkCanRun(RepairType.INCREMENTAL) when config.getMaterializedViewRepairEnabled(INCREMENTAL) is true AND DatabaseDescriptor.isMaterializedViewsOnRepairEnabled() is true.
Common situations: Clusters with materialized views that also enable MV-on-repair; operators switching repair type to incremental without revisiting MV replay 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 CDC replay is enabled…
- 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/f17260e93316ff8b.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/service/AutoRepairService.java:80
{
MBeanWrapper.instance.registerMBean(instance, MBEAN_NAME);
}
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()View on GitHub (pinned to 88fd0f6a0e)