{"record":{"id":"14a74ec0159060fe","repo":"apache/cassandra","slug":"unknown-param-for-commandstoreop-try-execute-l","errorCode":null,"errorMessage":"Unknown param for \" + CommandStoreOp.TRY_EXECUTE_LISTENING + \": '\" + param + \"'; expect only 'loop' or missing\"","messagePattern":"Unknown param for \" \\+ CommandStoreOp\\.TRY_EXECUTE_LISTENING \\+ \": '\" \\+ param \\+ \"'; expect only 'loop' or missing\"","errorType":"validation","errorClass":"InvalidRequestException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java","lineNumber":2071,"sourceCode":"                {\n                    if (param == null)\n                        throw new IllegalArgumentException(\"Must specify 'param' for \" + op);\n                    ModeFlag mode = tryParse(param, true, ModeFlag.class, ModeFlag::valueOf);\n                    boolean set = op == CommandStoreOp.SET_PROGRESS_LOG_MODE;\n                    function = commandStore -> {\n                        DefaultProgressLog progressLog = ((DefaultProgressLog)commandStore.unsafeProgressLog());\n                        if (set) progressLog.setMode(mode);\n                        else progressLog.unsetMode(mode);\n                        return AsyncResults.success(null);\n                    };\n                    break;\n                }\n                case TRY_EXECUTE_LISTENING:\n                {\n                    boolean loop;\n                    if (param == null) loop = false;\n                    else if (param.equalsIgnoreCase(\"loop\")) loop = true;\n                    else throw new InvalidRequestException(\"Unknown param for \" + CommandStoreOp.TRY_EXECUTE_LISTENING + \": '\" + param + \"'; expect only 'loop' or missing\");\n\n                    function = commandStore -> commandStore.tryToExecuteListeningTxns(loop);\n                    break;\n                }\n                case REPLAY:\n                {\n                    ReplayMode replayMode = tryParse(param, true, ReplayMode.class, ReplayMode::valueOf);\n                    function = commandStore -> {\n                        accord.journal().replay(commandStore, replayMode, 0L);\n                        return AsyncResults.success(null);\n                    };\n                    break;\n                }\n                case REBOOTSTRAP:\n                    allFunction = () -> node.commandStores().rebootstrap(node);\n                    function = commandStore -> commandStore.rebootstrap(node);\n                    break;\n                case HARD_CATCHUP:","sourceCodeStart":2053,"sourceCodeEnd":2089,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java#L2053-L2089","documentation":"For the TRY_EXECUTE_LISTENING CommandStoreOp, the optional 'param' may only be the string 'loop' (case-insensitive) or absent. Any other value triggers InvalidRequestException describing the only accepted values.","triggerScenarios":"INSERTing op = 'TRY_EXECUTE_LISTENING' with param set to anything other than 'loop', e.g. 'true', 'once', or a store id.","commonSituations":"Confusing boolean-style params ('true'/'false') with the literal flag 'loop'; copying 'param' from a different op's insert.","solutions":["Either omit 'param' (single execution) or set it exactly to 'loop' for repeated execution.","Remove unrelated columns from the INSERT.","Use a different op if a different parameterized behavior is needed."],"exampleFix":"// before\nINSERT INTO system_views.accord_command_store_ops (command_store_id, op, param) VALUES (0, 'TRY_EXECUTE_LISTENING', 'true');\n// after\nINSERT INTO system_views.accord_command_store_ops (command_store_id, op, param) VALUES (0, 'TRY_EXECUTE_LISTENING', 'loop');","handlingStrategy":"validation","validationCode":"if (op.equals(\"TRY_EXECUTE_LISTENING\") && param != null && !param.equalsIgnoreCase(\"loop\"))\n    throw new IllegalArgumentException(\"TRY_EXECUTE_LISTENING accepts only param 'loop' or no param, got '\" + param + \"'\");","typeGuard":null,"tryCatchPattern":"try {\n    session.execute(insert);\n} catch (InvalidRequestException e) {\n    if (e.getMessage().contains(\"expect only 'loop' or missing\")) {\n        // drop the param or set it to 'loop' and retry\n    }\n}","preventionTips":["For TRY_EXECUTE_LISTENING, either omit 'param' or use exactly 'loop'.","Never pass generic boolean strings like 'true'/'false' as param.","Keep op-specific param validation in one helper used by all writers."],"tags":["invalid-parameter","accord-debug","virtual-table"],"backgroundTag":"invalid-argument-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}