apache/cassandra · error · InvalidRequestException

Cannot enable accord on system tables

Error message

Cannot enable accord on system tables (%s.%s)

What it means

Transactional mode based on Accord cannot be enabled on system keyspaces. Tables created in system keyspaces must not use Accord transactional mode, so CREATE TABLE rejects any table with transactionalMode.accordIsEnabled targeting a system keyspace.

Solutions

  1. Create the table in a non-system keyspace when using Accord transactional mode.
  2. Drop the transactional_mode option for tables in system keyspaces.
  3. Filter system keyspaces out of any DDL-generation pipeline that injects transactional_mode.

Example fix

// before
CREATE TABLE system.mytable (id int PRIMARY KEY) WITH transactional_mode = 'accord';

// after
CREATE TABLE myapp.mytable (id int PRIMARY KEY) WITH transactional_mode = 'accord';
Defensive patterns

Strategy: validation

Validate before calling

if (isSystemKeyspace(ks) && tableOptions.containsKey("transactional_mode")) throw new IllegalArgumentException("transactional_mode cannot be set on system keyspace tables");

Try / catch

try { session.execute(ddl); } catch (InvalidQueryException e) { if (e.getMessage().contains("Cannot enable accord on system tables")) { /* retarget to a user keyspace or drop transactional_mode */ } else throw e; }

Prevention

When it happens

Trigger: `CREATE TABLE system.t (...) WITH transactional_mode = 'accord'` (or similar Accord-enabled transactional mode) where SchemaConstants.isSystemKeyspace(keyspaceName) is true in apply().

Common situations: Attempting to extend Accord-backed transactional behavior to system keyspaces during experiments or migrations; automated DDL generators applying transactional_mode options unconditionally, including to system.* tables.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at src/java/org/apache/cassandra/cql3/statements/schema/CreateTableStatement.java:189

        expandedCql = builder.build().toCqlString(false, attrs.hasProperty(TableAttributes.ID), ifNotExists);
        verifyExpandedCql(expandedCql);

        if (!attrs.hasProperty(TableAttributes.ID))
            builder.id(TableId.get(metadata));
        TableMetadata table = builder.build();
        table.validate();

        if (keyspace.replicationStrategy.hasTransientReplicas()
            && table.params.readRepair != ReadRepairStrategy.NONE)
        {
            throw ire("read_repair must be set to 'NONE' for transiently replicated keyspaces");
        }

        if (!table.params.compression.isEnabled() && !SchemaConstants.isSystemKeyspace(table.keyspace))
            Guardrails.uncompressedTablesEnabled.ensureEnabled(state);

        if (table.params.transactionalMode.accordIsEnabled && SchemaConstants.isSystemKeyspace(keyspaceName))
            throw ire("Cannot enable accord on system tables (%s.%s)", keyspaceName, tableName);

        if (table.params.transactionalMode.accordIsEnabled && !DatabaseDescriptor.getAccordTransactionsEnabled())
            throw ire(format("Cannot create table %s.%s with transactional mode %s with accord.enabled set to false",
                             keyspaceName, tableName, table.params.transactionalMode));

        if (table.params.transactionalMigrationFrom.isMigrating())
            throw ire("Cannot set transactional migration on new tables (%s.%s), %s", keyspaceName, tableName, table.params.transactionalMigrationFrom);

        return schema.withAddedOrUpdated(keyspace.withSwapped(keyspace.tables.with(table)));
    }

    @Override
    public void validate(ClientState state)
    {
        super.validate(state);

        // If a memtable configuration is specified, validate it against config
        if (attrs.hasOption(TableParams.Option.MEMTABLE))

View on GitHub (pinned to 88fd0f6a0e)