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

  1. Do not SELECT from accord_command_store_ops; use INSERT to enqueue operations only.
  2. Check results in the readable accord debug tables or logs after the op runs.
  3. 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

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


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)