apache/cassandra · error · InvalidRequestException

Cannot create table . with transactional mode with…

Error message

Cannot create table %s.%s with transactional mode %s with accord.enabled set to false

What it means

CREATE TABLE was issued with a transactional mode that uses Accord (e.g. full or serial) while the cluster-wide flag accord.enabled is false. Cassandra rejects the statement because Accord-backed transactional tables cannot function when Accord transactions are disabled. It is a schema creation guard, not a runtime fault.

Solutions

  1. Enable Accord by starting Cassandra with accord transactions enabled (accord.enabled=true / DatabaseDescriptor.getAccordTransactionsEnabled() returning true), then retry the DDL
  2. Use a non-Accord transactional mode, e.g. WITH transactional_mode = 'disabled'
  3. Remove the transactional_mode clause entirely to accept the default mode

Example fix

// before
CREATE TABLE ks.t (k int PRIMARY KEY) WITH transactional_mode = 'full';
// after (accord disabled)
CREATE TABLE ks.t (k int PRIMARY KEY) WITH transactional_mode = 'disabled';
Defensive patterns

Strategy: validation

Validate before calling

if (tableParams.getTransactionalMode().accordIsEnabled() && !DatabaseDescriptor.getAccordTransactionsEnabled()) throw new IllegalArgumentException("accord.enabled must be true to use an Accord transactional mode");

Try / catch

try { session.execute(ddl); } catch (InvalidRequestException e) { if (e.getMessage().contains("accord.enabled")) { /* enable accord or fall back to non-transactional mode */ } else throw e; }

Prevention

When it happens

Trigger: Running `CREATE TABLE ... WITH transactional_mode = 'full'` (or another Accord-enabled mode) in a cluster started without -Dcassandra.accord_transactions_enabled=true / accord.enabled=false.

Common situations: Developers experimenting with Accord transactional tables in trunk builds but forgetting to enable the flag in cassandra.yaml / JVM options; copy-pasted DDL from Accord demos into a standard cluster.

Related errors


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

Appendix: source

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

        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))
            MemtableParams.get(attrs.getString(TableParams.Option.MEMTABLE.toString()));

        // Guardrail on table properties

View on GitHub (pinned to 88fd0f6a0e)