{"record":{"id":"82bc54230b5049e8","repo":"apache/cassandra","slug":"cannot-create-table-s-s-with-transactional-mode","errorCode":null,"errorMessage":"Cannot create table %s.%s with transactional mode %s with accord.enabled set to false","messagePattern":"Cannot create table (.+?)\\.(.+?) with transactional mode (.+?) with accord\\.enabled set to false","errorType":"validation","errorClass":"InvalidRequestException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/cql3/statements/schema/CreateTableStatement.java","lineNumber":192,"sourceCode":"        if (!attrs.hasProperty(TableAttributes.ID))\n            builder.id(TableId.get(metadata));\n        TableMetadata table = builder.build();\n        table.validate();\n\n        if (keyspace.replicationStrategy.hasTransientReplicas()\n            && table.params.readRepair != ReadRepairStrategy.NONE)\n        {\n            throw ire(\"read_repair must be set to 'NONE' for transiently replicated keyspaces\");\n        }\n\n        if (!table.params.compression.isEnabled() && !SchemaConstants.isSystemKeyspace(table.keyspace))\n            Guardrails.uncompressedTablesEnabled.ensureEnabled(state);\n\n        if (table.params.transactionalMode.accordIsEnabled && SchemaConstants.isSystemKeyspace(keyspaceName))\n            throw ire(\"Cannot enable accord on system tables (%s.%s)\", keyspaceName, tableName);\n\n        if (table.params.transactionalMode.accordIsEnabled && !DatabaseDescriptor.getAccordTransactionsEnabled())\n            throw ire(format(\"Cannot create table %s.%s with transactional mode %s with accord.enabled set to false\",\n                             keyspaceName, tableName, table.params.transactionalMode));\n\n        if (table.params.transactionalMigrationFrom.isMigrating())\n            throw ire(\"Cannot set transactional migration on new tables (%s.%s), %s\", keyspaceName, tableName, table.params.transactionalMigrationFrom);\n\n        return schema.withAddedOrUpdated(keyspace.withSwapped(keyspace.tables.with(table)));\n    }\n\n    @Override\n    public void validate(ClientState state)\n    {\n        super.validate(state);\n\n        // If a memtable configuration is specified, validate it against config\n        if (attrs.hasOption(TableParams.Option.MEMTABLE))\n            MemtableParams.get(attrs.getString(TableParams.Option.MEMTABLE.toString()));\n\n        // Guardrail on table properties","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/cql3/statements/schema/CreateTableStatement.java#L174-L210","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Enable Accord by starting Cassandra with accord transactions enabled (accord.enabled=true / DatabaseDescriptor.getAccordTransactionsEnabled() returning true), then retry the DDL","Use a non-Accord transactional mode, e.g. WITH transactional_mode = 'disabled'","Remove the transactional_mode clause entirely to accept the default mode"],"exampleFix":"// before\nCREATE TABLE ks.t (k int PRIMARY KEY) WITH transactional_mode = 'full';\n// after (accord disabled)\nCREATE TABLE ks.t (k int PRIMARY KEY) WITH transactional_mode = 'disabled';","handlingStrategy":"validation","validationCode":"if (tableParams.getTransactionalMode().accordIsEnabled() && !DatabaseDescriptor.getAccordTransactionsEnabled()) throw new IllegalArgumentException(\"accord.enabled must be true to use an Accord transactional mode\");","typeGuard":null,"tryCatchPattern":"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; }","preventionTips":["Keep accord.enabled consistent across environments where Accord DDL is deployed","Centralize table DDL in migrations that assert the flag before applying","Default to transactional_mode='disabled' unless Accord is explicitly required"],"tags":["cql","accord","schema","configuration"],"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-17T15:17:12.973Z"}