{"record":{"id":"429b92854f19f598","repo":"apache/cassandra","slug":"auto-repair-scheduler-is-disabled","errorCode":null,"errorMessage":"Auto-repair scheduler is disabled.","messagePattern":"Auto-repair scheduler is disabled\\.","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/AutoRepairService.java","lineNumber":74,"sourceCode":"    public static void setup()\n    {\n        instance.config = DatabaseDescriptor.getAutoRepairConfig();\n    }\n\n    static\n    {\n        MBeanWrapper.instance.registerMBean(instance, MBEAN_NAME);\n    }\n\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()","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/AutoRepairService.java#L56-L92","documentation":"AutoRepairService.checkCanRun is the gate for executing auto-repair; its first check is the auto-repair scheduling config flag. When auto-repair scheduling is disabled, any checkCanRun call throws ConfigurationException('Auto-repair scheduler is disabled.') regardless of repair type.","triggerScenarios":"Invoking auto-repair (checkCanRun or the type-specific overloads) on a node where isAutoRepairSchedulingEnabled() returns false in the config.","commonSituations":"Clusters deployed with auto-repair scheduling off by default; operators triggering repair through tooling/JMX without first enabling the scheduler; post-upgrade configs that reset the flag.","solutions":["Enable auto-repair scheduling in cassandra.yaml and restart/reload config","Re-issue the repair request after enabling","Skip auto-repair and run manual repair if scheduling is intentionally disabled"],"exampleFix":"// cassandra.yaml\n// before\nautorepair_scheduling_enabled: false\n// after\nautorepair_scheduling_enabled: true","handlingStrategy":"validation","validationCode":"if (!DatabaseDescriptor.getRawConfig().autorepair_scheduling_enabled)\n    throw new IllegalStateException(\"Enable autorepair_scheduling_enabled before requesting auto-repair\");\nautoRepairService.checkCanRun(repairType);","typeGuard":null,"tryCatchPattern":"try { autoRepairService.checkCanRun(repairType); } catch (ConfigurationException e) { logger.warn(\"Auto-repair unavailable: {}\", e.getMessage()); }","preventionTips":["Gate auto-repair tooling on the scheduling-enabled config","Keep the flag consistent across the cluster to avoid per-node surprises","Document enablement steps in the repair runbook"],"tags":["repair","configuration","feature-flag"],"backgroundTag":"feature-not-enabled","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"}