{"record":{"id":"2f314ab5a2a2870e","repo":"apache/cassandra","slug":"cannot-return-configuration-when-accord-enabled","errorCode":null,"errorMessage":"Cannot return configuration when accord.enabled = false in cassandra.yaml","messagePattern":"Cannot return configuration when accord\\.enabled = false in cassandra\\.yaml","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/service/accord/IAccordService.java","lineNumber":367,"sourceCode":"\n        }\n\n        @Override\n        public AccordEndpointMapper endpointMapper()\n        {\n            throw new UnsupportedOperationException();\n        }\n\n        @Override\n        public AccordTopologyService topologyService()\n        {\n            throw new UnsupportedOperationException();\n        }\n\n        @Override\n        public Params journalConfiguration()\n        {\n            throw new UnsupportedOperationException(\"Cannot return configuration when accord.enabled = false in cassandra.yaml\");\n        }\n\n        @Override\n        public Node node()\n        {\n            return null;\n        }\n\n        @Override\n        public void ensureMinHlc(long minHlc)\n        {\n\n        }\n    }\n\n    class DelegatingAccordService implements IAccordService\n    {\n        protected IAccordService delegate;","sourceCodeStart":349,"sourceCodeEnd":385,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/accord/IAccordService.java#L349-L385","documentation":"SupportAccordService.journalConfiguration() throws UnsupportedOperationException ('Cannot return configuration when accord.enabled = false') because the Accord journal Params only exist when Accord is initialized. The stub rejects rather than returning default params that would never be used. Any code reading journal configuration on a disabled node reaches this throw.","triggerScenarios":"Calling IAccordService.journalConfiguration() (Accord journal Params accessor) while accord.enabled=false, typically during journal setup, tuning tools, or diagnostics.","commonSituations":"Ops tooling inspecting/tuning the Accord journal on a cluster where Accord is off; bootstrap code that unconditionally reads journal params; tests verifying journal defaults against the disabled service.","solutions":["Enable Accord in cassandra.yaml if journal configuration is required","Guard the accessor with isEnabled() and skip journal config handling when disabled","Refactor diagnostics to report 'Accord disabled' instead of querying journal params","Ensure the node is not accidentally running with a cassandra.yaml that disabled Accord"],"exampleFix":"// before\nParams params = accordService.journalConfiguration();\n// after\nif (!accordService.isEnabled())\n    return; // Accord journal not in use\nParams params = accordService.journalConfiguration();","handlingStrategy":"validation","validationCode":"if (accordService.isEnabled()) { Params p = accordService.journalConfiguration(); ... } else { skip journal diagnostics; }","typeGuard":"Params journalParamsIfEnabled(IAccordService s) { return s.isEnabled() ? s.journalConfiguration() : null; }","tryCatchPattern":"try { return accordService.journalConfiguration(); } catch (UnsupportedOperationException e) { logger.info(\"Accord journal not in use\"); return null; }","preventionTips":["Skip journal config tooling on nodes with Accord disabled","Confirm the intended cassandra.yaml is loaded before diagnostics","Guard param accessors with isEnabled()","Document that journal params are unavailable without Accord"],"tags":["accord","cassandra","journal","unsupported-operation"],"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-14T16:17:12.679Z"}