apache/cassandra · error · UnsupportedOperationException
COMMAND_STORE_OPS + " is a write-only table"
Error message
COMMAND_STORE_OPS + " is a write-only table"
What it means
The `accord_command_store_ops` virtual table is write-only: INSERTs enqueue per-command-store debug operations, and reads are unsupported - collect() throws UnsupportedOperationException unconditionally.
Solutions
- Do not SELECT from accord_command_store_ops; use INSERT to enqueue operations only.
- Check results in the readable accord debug tables or logs after the op runs.
- Request/provide a readable companion table upstream if op history is needed.
Example fix
// before SELECT * FROM system_views.accord_command_store_ops; // after INSERT INTO system_views.accord_command_store_ops (command_store_id, op) VALUES (0, '<op>');
Defensive patterns
Strategy: validation
Validate before calling
if (query.trim().toUpperCase().startsWith("SELECT") && query.contains("accord_command_store_ops"))
throw new IllegalArgumentException("accord_command_store_ops is write-only; do not SELECT from it"); Prevention
- Only INSERT into accord_command_store_ops.
- Do not assume all system_views virtual tables are readable.
- Keep per-table read/write semantics documented in your ops runbook.
When it happens
Trigger: Running any SELECT against system_views.accord_command_store_ops, e.g. `SELECT * FROM system_views.accord_command_store_ops;`.
Common situations: Trying to list queued debug ops by reading the table; generic tooling that snapshots all system_views tables; misunderstanding virtual-table semantics assuming all are queryable.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- NODE_OPS + " is a write-only table"
- TXN_OPS + " is a write-only table"
- metadata + " only supports single partition key queries"
- Must specify 'op'
- Unknown column " + columns[i].name.toString()
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/9d0b948d01b0b024.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java:2017
this.description = description;
}
}
private CommandStoreOpsTable()
{
super(parse(VIRTUAL_ACCORD_DEBUG, COMMAND_STORE_OPS,
"Update Accord CommandStore State",
"CREATE TABLE %s (\n" +
" command_store_id int,\n" +
" op text," +
" param text," +
" PRIMARY KEY (command_store_id)" +
')', Int32Type.instance), FAIL, UNSORTED);
}
@Override
protected void collect(PartitionsCollector collector)
{
throw new UnsupportedOperationException(COMMAND_STORE_OPS + " is a write-only table");
}
@Override
protected void applyRowUpdate(Object[] partitionKeys, Object[] clusteringKeys, ColumnMetadata[] columns, Object[] values)
{
int commandStoreId = (Integer) partitionKeys[0];
CommandStoreOp op = null;
String param = null;
for (int i = 0 ; i < columns.length ; ++i)
{
switch (columns[i].name.toString())
{
default: throw new IllegalArgumentException("Unknown column " + columns[i].name.toString());
case "op":
op = tryParse(values[i], true, CommandStoreOp.class, CommandStoreOp::valueOf);
break;
case "param":View on GitHub (pinned to 88fd0f6a0e)