{"record":{"id":"d4aa111a922cb70b","repo":"apache/cassandra","slug":"cannot-run-paxos-only-repair-on-s-s-which-isn-t-d4aa11","errorCode":null,"errorMessage":"Cannot run paxos only repair on %s.%s, which isn't configured for paxos operations","messagePattern":"Cannot run paxos only repair on (.+?)\\.(.+?), which isn't configured for paxos operations","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/repair/RepairJob.java","lineNumber":125,"sourceCode":"    /**\n     * Create repair job to run on specific columnfamily\n     *  @param session RepairSession that this RepairJob belongs\n     * @param columnFamily name of the ColumnFamily to repair\n     */\n    public RepairJob(RepairSession session, String columnFamily)\n    {\n        this.ctx = session.ctx;\n        this.session = session;\n        this.taskExecutor = session.taskExecutor;\n        this.parallelismDegree = session.parallelismDegree;\n        this.desc = new RepairJobDesc(session.state.parentRepairSession, session.getId(), session.state.keyspace, columnFamily, session.state.commonRange.ranges);\n        this.ks = Keyspace.open(desc.keyspace);\n        this.cfs = ks.getColumnFamilyStore(columnFamily);\n        this.state = new JobState(ctx.clock(), desc, session.state.commonRange.endpoints);\n\n        TableMetadata metadata = this.cfs.metadata();\n        if ((!session.repairData && !session.repairAccord) && !metadata.supportsPaxosOperations())\n            throw new IllegalArgumentException(String.format(\"Cannot run paxos only repair on %s.%s, which isn't configured for paxos operations\", cfs.keyspace.getName(), cfs.name));\n\n        if ((!session.repairData && !session.repairPaxos) && !metadata.requiresAccordSupport())\n            throw new IllegalArgumentException(String.format(\"Cannot run accord only repair on %s.%s, which isn't configured for accord operations\", cfs.keyspace.getName(), cfs.name));\n\n    }\n\n    public long getNowInSeconds()\n    {\n        long nowInSeconds = ctx.clock().nowInSeconds();\n        if (session.previewKind == PreviewKind.REPAIRED)\n        {\n            return nowInSeconds + DatabaseDescriptor.getValidationPreviewPurgeHeadStartInSec();\n        }\n        else\n        {\n            return nowInSeconds;\n        }\n    }","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/repair/RepairJob.java#L107-L143","documentation":"RepairJob's constructor validates table capabilities before starting a repair: if the session requested paxos-only repair (repairData=false and repairAccord=false) but the table metadata does not support paxos operations, an IllegalArgumentException is thrown. Paxos-only repair is meaningless for tables without paxos.","triggerScenarios":"Running `nodetool repair --repair-paxos` (without data/accord flags) on a table whose metadata.supportsPaxosOperations() is false.","commonSituations":"Paxos-only repair scripted across an entire keyspace where most tables don't use paxos; maintenance jobs assuming every table supports paxos; schema option changes after upgrades.","solutions":["Run a normal data repair instead of --repair-paxos for that table","Restrict paxos-only repair to tables that actually use paxos (metadata.supportsPaxosOperations())","Drop the --repair-paxos flag so repairData defaults to true"],"exampleFix":"// before\nnodetool repair --repair-paxos ks cf\n// after\nnodetool repair ks cf  // or verify the table supports paxos first","handlingStrategy":"validation","validationCode":"TableMetadata metadata = Schema.instance.getTableMetadata(keyspace, table);\nif (metadata != null && !metadata.supportsPaxosOperations())\n    throw new IllegalArgumentException(keyspace + \".\" + table + \" does not support paxos; use a normal repair\");","typeGuard":null,"tryCatchPattern":"try { session.submitRepair(...); }\ncatch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"paxos only repair\")) logger.warn(\"Skipping non-paxos table\", e);\n    else throw e;\n}","preventionTips":["Check metadata.supportsPaxosOperations() before --repair-paxos","Make per-table repair decisions instead of blanket keyspace repairs","Review table schema options after migrations/upgrades"],"tags":["repair","paxos","validation","illegal-argument"],"backgroundTag":"invalid-config-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}