{"record":{"id":"e34a47a94298dc85","repo":"apache/cassandra","slug":"invalid-limit-value-in-queue-active-limits-i","errorCode":null,"errorMessage":"Invalid limit ${value} in queue_active_limits: ${input}","messagePattern":"Invalid limit (.+?) in queue_active_limits: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/accord/execution/AccordExecutor.java","lineNumber":836,"sourceCode":"    }\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    }\n}\n","sourceCodeStart":818,"sourceCodeEnd":849,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/accord/execution/AccordExecutor.java#L818-L849","documentation":"When parsing a 'queue:limit' specifier, AccordExecutor requires the limit to be a long strictly between 0 and 128 (exclusive), because limits are packed one-per-byte into a bitmask. Limits of 0, negative, or >= 128 throw IllegalArgumentException with this message.","triggerScenarios":"Specifying 'load:0', 'load:-1', 'load:128', or 'load:200' in the queue_active_limits-style property consumed by AccordExecutor.parseEnumParams.","commonSituations":"Attempting to disable a queue with 0 (use omission instead); mixing up bit-width constraints; pasting a percentage or count over 127.","solutions":["Set limits in the range 1..127 for each queue specifier.","Remove a queue specifier entirely instead of using 0 to disable it.","Verify the value parses as a plain decimal long with no units (no 'k', '%', etc.)."],"exampleFix":"// before\n-Dcassandra.acord.queue_active_limits=load:0;local:130\n// after\n-Dcassandra.acord.queue_active_limits=load:1;local:127","handlingStrategy":"validation","validationCode":"long limit = Long.parseLong(spec.split(\":\")[1]);\nif (limit <= 0 || limit >= 128) throw new IllegalArgumentException(\"limit must be 1..127: \" + limit);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep per-queue limits within 1..127 (one byte per queue).","Omit a queue specifier instead of using 0.","Never append units to numeric limits."],"tags":["accord","parsing","value-range"],"backgroundTag":"value-out-of-range","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"}