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 (Accord) cannot be enabled on tables in the system keyspaces. validateAndUpdateTransactionalMigration (AlterTableStatement.java:642) rejects any altered TableParams whose transactionalMode has Accord enabled when SchemaConstants.isSystemKeyspace(keyspaceName) is true, since internal tables must keep the default transactional behavior.
Solutions
- Do not enable Accord on system tables; keep transactional_mode = 'off' for them
- Apply the transactional_mode change to your application keyspaces' tables only
- If a generated script targets system tables, exclude them from the migration
Example fix
// before ALTER TABLE system.local WITH transactional_mode = 'accord'; // after ALTER TABLE my_app.orders WITH transactional_mode = 'accord';
Defensive patterns
Strategy: validation
Validate before calling
if (SchemaConstants.isSystemKeyspace(ks) && params.transactionalMode.accordIsEnabled) { /* skip or reject the alteration before sending */ } Try / catch
try { session.execute(alterStmt); } catch (InvalidRequestException e) { if (e.getMessage().startsWith("Cannot enable accord on system tables")) { /* exclude system keyspaces from migration */ } else throw e; } Prevention
- Filter out system keyspaces in any schema-migration tool
- Never copy table params from app tables onto system tables
- Keep transactional_mode 'off' for all internal tables
When it happens
Trigger: ALTER TABLE system.some_table WITH transactional_mode = 'accord' (or any Accord-enabled mode), applied via CQL or a programmatic TableParams alteration on a keyspace like system, system_schema, etc.
Common situations: Trying to experiment with Accord-based transactions on internal tables; schema generation tools copying table params from an application keyspace onto a system table.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Counters are not supported with Accord for table
- Cannot change transactional mode from
- Cannot change transactional mode to
- Cannot enable accord on system tables
- ACCESS TO DATACENTERS operations not supported by…
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/b89405fa46f27f52.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/cql3/statements/schema/AlterTableStatement.java:642
@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()));
Guardrails.tableProperties.guard(attrs.updatedProperties(), attrs::removeProperty, state);
TableParams paramsForValidation = attrs.asNewTableParams(keyspaceName);
validateDefaultTimeToLive(paramsForValidation);
validateMinimumTrainingFrequencyForDictionaryCompressor(paramsForValidation);
}
private TableParams validateAndUpdateTransactionalMigration(boolean isCounter, TableParams prev, TableParams next)
{
if (next.transactionalMode.accordIsEnabled && SchemaConstants.isSystemKeyspace(keyspaceName))
throw ire("Cannot enable accord on system tables (%s.%s)", keyspaceName, tableName);
boolean modeChange = prev.transactionalMode != next.transactionalMode;
boolean wasMigrating = prev.transactionalMigrationFrom.isMigrating();
boolean explicitlySetMigrationFrom = attrs.hasOption(Option.TRANSACTIONAL_MIGRATION_FROM);
// set table to migrating
TransactionalMigrationFromMode newMigrateFrom = TransactionalMigrationFromMode.fromMode(prev.transactionalMode, next.transactionalMode);
if (isCounter && (next.transactionalMode != TransactionalMode.off || newMigrateFrom != TransactionalMigrationFromMode.none || next.transactionalMigrationFrom != TransactionalMigrationFromMode.none))
throw ire(format(ACCORD_COUNTER_TABLES_UNSUPPORTED, keyspaceName, tableName));
boolean forceMigrationChange = modeChange && explicitlySetMigrationFrom && next.transactionalMigrationFrom != newMigrateFrom;
if (modeChange && next.transactionalMode.accordIsEnabled && !DatabaseDescriptor.getAccordTransactionsEnabled())
throw ire(format("Cannot change transactional mode to %s for %s.%s with accord.enabled set to false",
next.transactionalMode, keyspaceName, tableName));
// user is manually updating migration mode, don't interfere
if (forceMigrationChange)View on GitHub (pinned to 88fd0f6a0e)