{"record":{"id":"1801667500ac187a","repo":"apache/cassandra","slug":"invalid-specifier-spec-in-describe-input","errorCode":null,"errorMessage":"Invalid specifier ${spec} in ${describe}: ${input}","messagePattern":"Invalid specifier (.+?) in (.+?): (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/accord/execution/AccordExecutor.java","lineNumber":829,"sourceCode":"        String[] specs = input.split(\";\");\n        if (specs.length != 2)\n            throw new IllegalArgumentException(\"Invalid specifiers in \" + describe + \"; expect [GlobalGroup];[ExclusiveGroup] but got: \" + input);\n        long[] result = new long[2];\n        result[0] = parseEnumParams(GlobalGroup::valueOf, specs[0], describe + \" for GlobalGroup\");\n        result[1] = parseEnumParams(ExclusiveGroup::valueOf, specs[1], describe + \" for ExclusiveGroup\");\n        return result;\n    }\n\n    private static long parseEnumParams(Function<String, ? extends Enum<?>> get, String input, String describe)\n    {\n        long result = 0;\n        for (String spec : input.split(\",\"))\n        {\n            if (spec.trim().isEmpty()) continue;\n\n            String[] split = spec.split(\":\");\n            if (split.length != 2)\n                throw new IllegalArgumentException(\"Invalid specifier \" + spec + \" in \" + describe + \": \" + input);\n\n            try\n            {\n                Enum<?> queue = get.apply(split[0]);\n                long value = Long.parseLong(split[1]);\n                if (value <= 0 || value >= 128)\n                    throw new IllegalArgumentException(\"Invalid limit \" + value + \" in queue_active_limits: \" + input);\n\n                result |= value << (queue.ordinal() * 8);\n            }\n            catch (Throwable t)\n            {\n                throw new IllegalArgumentException(\"Invalid queue identifier \" + split[0] + \" in \" + describe + \": \" + input);\n            }\n        }\n\n        return result;\n    }","sourceCodeStart":811,"sourceCodeEnd":847,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/accord/execution/AccordExecutor.java#L811-L847","documentation":"Within AccordExecutor's enum-parameter parsing, each semicolon-part must be comma-separated specifiers of the form 'QueueName:limit'. If a specifier does not split into exactly two colon-separated fields, IllegalArgumentException is thrown naming the offending spec. It validates the per-queue limit syntax before any enum lookup.","triggerScenarios":"Passing a specifier without exactly one colon, e.g. 'load8;local:4' or 'load:8:extra;local:4', into the queue active limits property parsed by AccordExecutor.","commonSituations":"Omitting the limit value or colon; accidental extra colon (IPv6-like or pasted text); shell mangling of characters.","solutions":["Format each specifier as <QueueName>:<limit>, e.g. load:8, and comma-separate multiple queues within a group.","Ensure the full value has exactly two semicolon-separated groups (see error 1971).","Quote the property value to prevent shell reinterpretation."],"exampleFix":"// before\n-Dcassandra.acord.queue_active_limits=load8;local4\n// after\n-Dcassandra.acord.queue_active_limits=load:8;local:4","handlingStrategy":"validation","validationCode":"for (String part : value.split(\";\")) for (String spec : part.split(\",\")) if (!spec.matches(\"[^:]+:[0-9]+\")) throw new IllegalArgumentException(\"bad specifier: \" + spec);","typeGuard":null,"tryCatchPattern":"try { parseSpec(spec); } catch (IllegalArgumentException e) { LOG.error(\"Specifier '{}' rejected: {}\", spec, e.getMessage()); }","preventionTips":["Follow strict <Queue>:<limit> syntax per specifier.","Avoid extra colons (e.g. untrimmed IPv6-like strings).","Comma-separate queues within a group; semicolon only between groups."],"tags":["accord","parsing","argument-format"],"backgroundTag":"invalid-argument-format","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"}