{"record":{"id":"d353c946e17fb036","repo":"apache/cassandra","slug":"replication-factor-should-not-be-set-if-previous-o","errorCode":null,"errorMessage":"Replication factor should not be set if previous operation is resumed","messagePattern":"Replication factor should not be set if previous operation is resumed","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/nodetool/CMSAdmin.java","lineNumber":150,"sourceCode":"        {\n            if (status)\n            {\n                Map<String, List<String>> status = probe.getCMSOperationsProxy().reconfigureCMSStatus();\n                if (status == null)\n                {\n                    output.out.println(\"No active reconfiguration\");\n                }\n                else\n                {\n                    for (Map.Entry<String, List<String>> e : status.entrySet())\n                        output.out.printf(\"%s: %s%n\", e.getKey(), e.getValue());\n                }\n                return;\n            }\n            if (resume)\n            {\n                if (!args.isEmpty())\n                    throw new IllegalArgumentException(\"Replication factor should not be set if previous operation is resumed\");\n\n                probe.getCMSOperationsProxy().resumeReconfigureCms();\n                return;\n            }\n\n            if (cancel)\n            {\n                probe.getCMSOperationsProxy().cancelReconfigureCms();\n                return;\n            }\n\n            if (args.isEmpty())\n                throw new IllegalArgumentException(\"Replication factor is empty\");\n\n            Map<String, Integer> parsedRfs = new HashMap<>(args.size());\n            for (String rf : args)\n            {\n                if (!rf.contains(\":\"))","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/nodetool/CMSAdmin.java#L132-L168","documentation":"nodetool cms takes --resume to continue a previously interrupted CMS reconfiguration. execute() throws IllegalArgumentException when extra positional args (replication factors) are passed along with --resume, since a resumed operation already carries its own target RF.","triggerScenarios":"Running 'nodetool cms --resume rf1=x' or 'nodetool cms --resume <dc>:3' — resume combined with any replication factor arguments.","commonSituations":"Script building a cms command with args always appended; operator resuming after editing the RF args expecting them to apply; copy-pasting a full 'cms --rf' command and adding --resume.","solutions":["Call 'nodetool cms --resume' with no positional args","If you want to change the RF, start a fresh reconfiguration with the RF args instead of resuming","Cancel the stuck reconfiguration first (cms --cancel), then invoke cms with the new RF"],"exampleFix":"// before\nnodetool cms --resume 3\n// after\nnodetool cms --resume","handlingStrategy":"validation","validationCode":"if (resume && rfArgs.size() > 0)\n    throw new IllegalArgumentException(\"--resume takes no RF arguments; omit them or start a fresh reconfigure\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["--resume never takes positional args","To change RF, run cms with RF args (no --resume)","Cancel before reconfiguring with new RF"],"tags":["nodetool","cli","cms","conflicting-options"],"backgroundTag":"mutually-exclusive-options","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"}