apache/cassandra · error · IllegalArgumentException
Must specify 'op'
Error message
Must specify 'op'
What it means
After parsing an INSERT into accord_command_store_ops, if no 'op' column value was supplied the row cannot dispatch any debug operation, so an IllegalArgumentException("Must specify 'op'") is thrown. Every write to this table must name the CommandStoreOp to run.
Solutions
- Include the 'op' column with a valid CommandStoreOp enum value (e.g. 'REPLAY', 'SET_PROGRESS_LOG_MODE').
- List accepted ops via the enum CommandStoreOp in the Cassandra source or DESCRIBE the table.
- Remove the stray empty INSERT instead of sending an op-less row.
Example fix
// before INSERT INTO system_views.accord_command_store_ops (command_store_id) VALUES (0); // after INSERT INTO system_views.accord_command_store_ops (command_store_id, op) VALUES (0, 'REPLAY');
Defensive patterns
Strategy: validation
Validate before calling
if (insertValues.get("op") == null || insertValues.get("op").isBlank())
throw new IllegalArgumentException("accord_command_store_ops inserts must specify 'op'"); Try / catch
try {
session.execute(insert);
} catch (IllegalArgumentException e) {
if (e.getMessage().equals("Must specify 'op'")) {
// add the op column with a valid CommandStoreOp value and retry
}
} Prevention
- Always include 'op' in every INSERT to accord_command_store_ops.
- Validate op names against the CommandStoreOp enum.
- Build inserts from a shared helper that enforces required columns.
When it happens
Trigger: INSERTing a row that sets only command_store_id (and optionally 'param') without an 'op' column, or inserting NULL for 'op'.
Common situations: Partially filled INSERT templates; forgetting that virtual-table writes require all meaningful columns; trying to 'clear' a row by omitting op.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- COMMAND_STORE_OPS + " is a write-only table"
- metadata + " only supports single partition key queries"
- Must specify 'param' for " + op
- NODE_OPS + " is a write-only table"
- TXN_OPS + " is a write-only table"
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/137809c02fd0971b.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java:2042
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":
param = (String) values[i];
break;
}
}
if (op == null)
throw new IllegalArgumentException("Must specify 'op'");
final AccordService accord = (AccordService) AccordService.unsafeInstance();
final Node node = accord.node();
final Function<CommandStore, AsyncResult<?>> function;
Supplier<AsyncResult<?>> allFunction = null;
switch (op)
{
default: throw new UnhandledEnum(op);
case SET_PROGRESS_LOG_MODE:
case UNSET_PROGRESS_LOG_MODE:
{
if (param == null)
throw new IllegalArgumentException("Must specify 'param' for " + op);
ModeFlag mode = tryParse(param, true, ModeFlag.class, ModeFlag::valueOf);
boolean set = op == CommandStoreOp.SET_PROGRESS_LOG_MODE;
function = commandStore -> {
DefaultProgressLog progressLog = ((DefaultProgressLog)commandStore.unsafeProgressLog());
if (set) progressLog.setMode(mode);View on GitHub (pinned to 88fd0f6a0e)