apache/cassandra · error · IllegalArgumentException
Must specify 'param' for " + op
Error message
Must specify 'param' for " + op
What it means
For the CommandStoreOps SET_PROGRESS_LOG_MODE and UNSET_PROGRESS_LOG_MODE, the 'param' column is mandatory because it names the ModeFlag to set/unset. When param is null an IllegalArgumentException("Must specify 'param' for <op>") is thrown.
Solutions
- Supply 'param' with a valid ModeFlag name (e.g. mode enum value used by DefaultProgressLog).
- If the intent was not a mode change, choose the correct op that takes no param.
- Verify ModeFlag enum values in the source before writing.
Example fix
// before INSERT INTO system_views.accord_command_store_ops (command_store_id, op) VALUES (0, 'SET_PROGRESS_LOG_MODE'); // after INSERT INTO system_views.accord_command_store_ops (command_store_id, op, param) VALUES (0, 'SET_PROGRESS_LOG_MODE', 'NORMAL');
Defensive patterns
Strategy: validation
Validate before calling
if ((op.equals("SET_PROGRESS_LOG_MODE") || op.equals("UNSET_PROGRESS_LOG_MODE")) && (param == null || param.isBlank()))
throw new IllegalArgumentException("op " + op + " requires the 'param' column with a ModeFlag value"); Try / catch
try {
session.execute(insert);
} catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("Must specify 'param' for")) {
// re-issue the INSERT including param = <ModeFlag>
}
} Prevention
- Treat SET/UNSET_PROGRESS_LOG_MODE as parameterized ops that always need 'param'.
- Validate ModeFlag names before writing (e.g. against the ModeFlag enum).
- Model each op's required columns in your automation instead of a single generic insert.
When it happens
Trigger: INSERTing into system_views.accord_command_store_ops with op = 'SET_PROGRESS_LOG_MODE' or 'UNSET_PROGRESS_LOG_MODE' but omitting the 'param' column or leaving it NULL.
Common situations: Assuming mode ops work without an argument like other ops (e.g. REPLAY); templates copied from ops that don't need params.
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
- Must specify 'op'
- COMMAND_STORE_OPS + " is a write-only table"
- metadata + " only supports single partition key queries"
- 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/54fe75e902d55e16.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java:2055
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);
else progressLog.unsetMode(mode);
return AsyncResults.success(null);
};
break;
}
case TRY_EXECUTE_LISTENING:
{
boolean loop;
if (param == null) loop = false;
else if (param.equalsIgnoreCase("loop")) loop = true;
else throw new InvalidRequestException("Unknown param for " + CommandStoreOp.TRY_EXECUTE_LISTENING + ": '" + param + "'; expect only 'loop' or missing");
function = commandStore -> commandStore.tryToExecuteListeningTxns(loop);View on GitHub (pinned to 88fd0f6a0e)