apache/cassandra · warning · UnsupportedOperationException

Cannot return configuration when accord.enabled = false in c

Error message

Cannot return configuration when accord.enabled = false in cassandra.yaml

What it means

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.

Source

Thrown at src/java/org/apache/cassandra/service/accord/IAccordService.java:367

        }

        @Override
        public AccordEndpointMapper endpointMapper()
        {
            throw new UnsupportedOperationException();
        }

        @Override
        public AccordTopologyService topologyService()
        {
            throw new UnsupportedOperationException();
        }

        @Override
        public Params journalConfiguration()
        {
            throw new UnsupportedOperationException("Cannot return configuration when accord.enabled = false in cassandra.yaml");
        }

        @Override
        public Node node()
        {
            return null;
        }

        @Override
        public void ensureMinHlc(long minHlc)
        {

        }
    }

    class DelegatingAccordService implements IAccordService
    {
        protected IAccordService delegate;

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Enable Accord in cassandra.yaml if journal configuration is required
  2. Guard the accessor with isEnabled() and skip journal config handling when disabled
  3. Refactor diagnostics to report 'Accord disabled' instead of querying journal params
  4. Ensure the node is not accidentally running with a cassandra.yaml that disabled Accord

Example fix

// before
Params params = accordService.journalConfiguration();
// after
if (!accordService.isEnabled())
    return; // Accord journal not in use
Params params = accordService.journalConfiguration();
Defensive patterns

Strategy: validation

Validate before calling

if (accordService.isEnabled()) { Params p = accordService.journalConfiguration(); ... } else { skip journal diagnostics; }

Type guard

Params journalParamsIfEnabled(IAccordService s) { return s.isEnabled() ? s.journalConfiguration() : null; }

Try / catch

try { return accordService.journalConfiguration(); } catch (UnsupportedOperationException e) { logger.info("Accord journal not in use"); return null; }

Prevention

When it happens

Trigger: Calling IAccordService.journalConfiguration() (Accord journal Params accessor) while accord.enabled=false, typically during journal setup, tuning tools, or diagnostics.

Common situations: 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.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/2f314ab5a2a2870e. Report an issue: GitHub.