apache/cassandra · error · InvalidRequestException
Accord transactions are disabled on table (table is being…
Error message
Accord transactions are disabled on table (table is being dropped); %s statement %s
What it means
The table targeted by a transactional SELECT is pending drop, so Accord refuses to run transactions against it. TransactionStatement.validate(SelectStatement) throws when prepared.table.params.pendingDrop is true.
Solutions
- Wait for the DROP TABLE to complete, then stop referencing the table
- Cancel/avoid dropping the table if transactions are still needed
- Remove the pending-drop table from the transaction
Example fix
// before (drop in flight) BEGIN TRANSACTION SELECT ... FROM dying_t; COMMIT; // after // complete/cancel the drop, then use a live table BEGIN TRANSACTION SELECT ... FROM live_t; COMMIT;
Defensive patterns
Strategy: retry
Validate before calling
// verify the table still exists and is not being dropped
if (cluster.getMetadata().getKeyspace(ks) == null || cluster.getMetadata().getKeyspace(ks).getTable(table) == null) throw new IllegalStateException("table missing/pending drop"); Try / catch
try { session.execute(txnCql); } catch (InvalidRequestException e) { if (e.getMessage().contains("table is being dropped")) { /* back off, refresh schema metadata, skip target */ } else throw e; } Prevention
- Coordinate schema drops with application deployments
- Refresh cluster metadata before issuing transactions after migrations
- Use feature flags to stop traffic to tables slated for deletion
When it happens
Trigger: Issuing BEGIN TRANSACTION ... COMMIT containing a SELECT on a table that is being dropped (a DROP TABLE for it is in progress, typically staged via DROP TABLE with a wait or in-flight drop).
Common situations: Race between a schema migration dropping a table and application code still issuing transactions on it.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- No aggregation functions allowed within a transaction;
- No GROUP BY clause allowed within a transaction;
- No ORDER BY clause allowed within a transaction;
- Accord transactions are disabled on table (See…
- Aggregate name ' ' is invalid
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/a8a51d6b12446bcb.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/cql3/statements/TransactionStatement.java:708
{
// false is the default, but still best to be explicit.
return false;
}
private static void validate(SelectStatement.RawStatement select)
{
if (select.parameters.orderings != null && !select.parameters.orderings.isEmpty())
throw invalidRequest(NO_ORDER_BY_IN_TXNS_MESSAGE, "SELECT", select.source);
if (select.parameters.groups != null && !select.parameters.groups.isEmpty())
throw invalidRequest(NO_GROUP_BY_IN_TXNS_MESSAGE, "SELECT", select.source);
}
private static void validate(SelectStatement prepared)
{
if (!prepared.table.isAccordEnabled())
throw invalidRequest(TRANSACTIONS_DISABLED_ON_TABLE_MESSAGE, "SELECT", prepared.source);
if (prepared.table.params.pendingDrop)
throw invalidRequest(TRANSACTIONS_DISABLED_ON_TABLE_BEING_DROPPED_MESSAGE, "SELECT", prepared.source);
if (prepared.table.isCounter())
throw invalidRequest(NO_COUNTERS_IN_TXNS_MESSAGE, "SELECT", prepared.source);
if (prepared.hasAggregation())
throw invalidRequest(NO_AGGREGATION_IN_TXNS_MESSAGE, "SELECT", prepared.source);
// when "LIMIT ?" this check can't be performed, so need to do again once the options are known
if (prepared.getRestrictions().keyIsInRelation())
checkTrue(prepared.isLimitMarker() || prepared.getLimit(null) == DataLimits.NO_LIMIT, NO_PARTITION_IN_CLAUSE_WITH_LIMIT, "SELECT", prepared.source);
}
public static class Parsed extends QualifiedStatement.Composite
{
private final List<SelectStatement.RawStatement> assignments;
private final SelectStatement.RawStatement select;
private final List<RowDataReference.Raw> returning;
private final List<ModificationStatement.Parsed> updates;
private final List<ConditionStatement.Raw> conditions;
private final List<RowDataReference.Raw> dataReferences;View on GitHub (pinned to 88fd0f6a0e)