apache/cassandra · error · UnsupportedOperationException

No accord transaction should be executed when accord.enabled

Error message

No accord transaction should be executed when accord.enabled = false in cassandra.yaml

What it means

SupportAccordService is the placeholder IAccordService implementation installed when accord.enabled=false in cassandra.yaml. Every transactional entry point throws UnsupportedOperationException because executing Accord transactions is impossible while Accord is disabled. Hitting this means code paths reached Accord APIs despite the feature being turned off.

Source

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

    {
        private static final Future<Void> BOOTSTRAP_SUCCESS = ImmediateFuture.success(null);

        @Override
        public IVerbHandler<? extends Request> requestHandler()
        {
            return null;
        }

        @Override
        public IVerbHandler<? extends Reply> responseHandler()
        {
            return null;
        }

        @Override
        public AsyncResult<Void> sync(Object requestedBy, @Nullable TxnId onOrAfter, Ranges ranges, @Nullable Collection<Id> include, SyncLocal syncLocal, SyncRemote syncRemote, long timeout, TimeUnit timeoutUnits)
        {
            throw new UnsupportedOperationException("No accord transaction should be executed when accord.enabled = false in cassandra.yaml");
        }

        @Override
        public AsyncChain<Void> sync(@Nullable TxnId onOrAfter, Keys keys, SyncLocal syncLocal, SyncRemote syncRemote)
        {
            throw new UnsupportedOperationException("No accord transaction should be executed when accord.enabled = false in cassandra.yaml");
        }

        @Override
        public AsyncChain<Timestamp> maxConflict(Ranges ranges)
        {
            throw new UnsupportedOperationException("No accord transaction should be executed when accord.enabled = false in cassandra.yaml");
        }

        @Override
        public @Nonnull TxnResult coordinate(long minEpoch, @Nonnull Txn txn, @Nonnull ConsistencyLevel consistencyLevel, @Nonnull RequestTime requestTime, long minHlc)
        {
            throw new UnsupportedOperationException("No accord transaction should be executed when accord.enabled = false in cassandra.yaml");

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Set accord.enabled=true in cassandra.yaml and restart the node if Accord functionality is required
  2. Remove or gate the code path calling IAccordService.sync so it is not invoked when Accord is disabled
  3. Check StorageService/IAccordService.isEnabled() before invoking any Accord API and branch to the non-Accord path
  4. Verify the node loaded the intended cassandra.yaml (wrong config file can silently leave Accord disabled)

Example fix

// before
accordService.sync(requestedBy, null, ranges, null, syncLocal, syncRemote, timeout, TimeUnit.MILLISECONDS);
// after
if (accordService.isEnabled())
    accordService.sync(requestedBy, null, ranges, null, syncLocal, syncRemote, timeout, TimeUnit.MILLISECONDS);
else
    logger.info("Skipping Accord sync: accord.enabled=false");
Defensive patterns

Strategy: try-catch

Validate before calling

if (!accordService.isEnabled()) { /* skip Accord sync or use non-Accord path */ }

Type guard

boolean accordAvailable(IAccordService s) { return s != null && s.isEnabled(); }

Try / catch

try { accordService.sync(requestedBy, onOrAfter, ranges, include, syncLocal, syncRemote, timeout, units); } catch (UnsupportedOperationException e) { logger.warn("Accord disabled; skipping sync", e); }

Prevention

When it happens

Trigger: Calling IAccordService.sync(requestedBy, onOrAfter, ranges, include, syncLocal, syncRemote, timeout, units) on SupportAccordService, i.e. any code path that performs Accord replica sync/reconciliation while accord.enabled=false.

Common situations: Operator disables Accord in cassandra.yaml but application code, a tool, or a tests path still invokes Accord sync/repair routines; version upgrades where new code unconditionally touches Accord APIs; tests exercising sync against a node configured without Accord.

Related errors


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