{"record":{"id":"0b8ef13e3d31ac00","repo":"apache/cassandra","slug":"accord-transactions-are-disabled-on-table-see-tra","errorCode":null,"errorMessage":"Accord transactions are disabled on table (See transactional_mode in table options); %s statement %s","messagePattern":"Accord transactions are disabled on table \\(See transactional_mode in table options\\); (.+?) statement (.+?)","errorType":"validation","errorClass":"InvalidRequestException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/cql3/statements/TransactionStatement.java","lineNumber":706,"sourceCode":"    @Override\n    public boolean eligibleAsPreparedStatement()\n    {\n        // false is the default, but still best to be explicit.\n        return false;\n    }\n\n    private static void validate(SelectStatement.RawStatement select)\n    {\n        if (select.parameters.orderings != null && !select.parameters.orderings.isEmpty())\n            throw invalidRequest(NO_ORDER_BY_IN_TXNS_MESSAGE, \"SELECT\", select.source);\n        if (select.parameters.groups != null && !select.parameters.groups.isEmpty())\n            throw invalidRequest(NO_GROUP_BY_IN_TXNS_MESSAGE, \"SELECT\", select.source);\n    }\n\n    private static void validate(SelectStatement prepared)\n    {\n        if (!prepared.table.isAccordEnabled())\n            throw invalidRequest(TRANSACTIONS_DISABLED_ON_TABLE_MESSAGE, \"SELECT\", prepared.source);\n        if (prepared.table.params.pendingDrop)\n            throw invalidRequest(TRANSACTIONS_DISABLED_ON_TABLE_BEING_DROPPED_MESSAGE, \"SELECT\", prepared.source);\n        if (prepared.table.isCounter())\n            throw invalidRequest(NO_COUNTERS_IN_TXNS_MESSAGE, \"SELECT\", prepared.source);\n        if (prepared.hasAggregation())\n            throw invalidRequest(NO_AGGREGATION_IN_TXNS_MESSAGE, \"SELECT\", prepared.source);\n\n        // when \"LIMIT ?\" this check can't be performed, so need to do again once the options are known\n        if (prepared.getRestrictions().keyIsInRelation())\n            checkTrue(prepared.isLimitMarker() || prepared.getLimit(null) == DataLimits.NO_LIMIT, NO_PARTITION_IN_CLAUSE_WITH_LIMIT, \"SELECT\", prepared.source);\n    }\n\n    public static class Parsed extends QualifiedStatement.Composite\n    {\n        private final List<SelectStatement.RawStatement> assignments;\n        private final SelectStatement.RawStatement select;\n        private final List<RowDataReference.Raw> returning;\n        private final List<ModificationStatement.Parsed> updates;","sourceCodeStart":688,"sourceCodeEnd":724,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/cql3/statements/TransactionStatement.java#L688-L724","documentation":"The target table of a SELECT in a transaction has transactional_mode not set to full (Accord disabled), so the statement cannot participate in an Accord transaction. TransactionStatement.validate(SelectStatement) checks prepared.table.isAccordEnabled() and rejects the SELECT.","triggerScenarios":"Executing any SELECT inside BEGIN TRANSACTION ... COMMIT against a table created/Altered with `transactional_mode = off` (or not set to full) in table options.","commonSituations":"Tables created before enabling Accord that were never migrated; setting transactional_mode to the wrong value or forgetting it in WITH options.","solutions":["Enable Accord on the table: ALTER TABLE t WITH transactional_mode = 'full' (all replicas must be Accord-capable)","Remove the SELECT of that table from the transaction","Verify the table's current mode via DESCRIBE / schema metadata"],"exampleFix":"// before\nCREATE TABLE t (...) WITH transactional_mode = 'off';\n// after\nALTER TABLE t WITH transactional_mode = 'full';","handlingStrategy":"validation","validationCode":"KeyspaceMetadata ks = cluster.getMetadata().getKeyspace(keyspace); TableMetadata t = ks.getTable(table); if (!t.getOptions().getTransactionalMode().isFull()) throw new IllegalStateException(\"Accord disabled on \" + table);","typeGuard":null,"tryCatchPattern":"try { session.execute(txnCql); } catch (InvalidRequestException e) { if (e.getMessage().contains(\"Accord transactions are disabled on table\")) { /* fall back to non-transactional path or ALTER table */ } else throw e; }","preventionTips":["Set transactional_mode = 'full' on every table used in transactions","Check schema metadata for Accord enablement before building transactions","Pin cluster/table configuration in infrastructure-as-code"],"tags":["cql","accord","transactions","table-options"],"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-14T16:17:12.679Z"}