{"record":{"id":"1e8bd681f1de31a0","repo":"apache/cassandra","slug":"fast-path-strategy-must-either-be-keyspace-sim","errorCode":null,"errorMessage":"Fast path strategy must either be 'keyspace', 'simple', 'up' or a map size and optional dcs {'size':n, 'dcs': dc0,dc1...","messagePattern":"Fast path strategy must either be 'keyspace', 'simple', 'up' or a map size and optional dcs \\{'size':n, 'dcs': dc0,dc1\\.\\.\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/accord/topology/FastPathStrategy.java","lineNumber":136,"sourceCode":"                return inheritKeyspace();\n            case UP:\n                return up();\n            default:\n                throw new IllegalArgumentException(\"Unhandled strategy kind: \" + kind);\n        }\n    }\n\n    static FastPathStrategy tableStrategyFromString(String s)\n    {\n        s = toLowerCaseLocalized(s).trim();\n        if (s.equals(\"keyspace\"))\n            return InheritKeyspaceFastPathStrategy.instance;\n        if (s.equals(\"simple\"))\n            return SimpleFastPathStrategy.instance;\n        if (s.equals(\"up\"))\n            return UpFastPathStrategy.instance;\n\n        throw new ConfigurationException(\"Fast path strategy must either be 'keyspace', 'simple', 'up' or a map size and optional dcs {'size':n, 'dcs': dc0,dc1...\");\n    }\n\n    static FastPathStrategy keyspaceStrategyFromString(String s)\n    {\n        s = toLowerCaseLocalized(s).trim();\n        if (s.equals(\"simple\"))\n            return SimpleFastPathStrategy.instance;\n        if (s.equals(\"up\"))\n            return UpFastPathStrategy.instance;\n\n        throw new ConfigurationException(\"Fast path strategy must either be 'simple', 'up' or a map size and optional dcs {'size':n, 'dcs': dc0,dc1...\");\n    }\n\n    static FastPathStrategy simple()\n    {\n        return SimpleFastPathStrategy.instance;\n    }\n","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/accord/topology/FastPathStrategy.java#L118-L154","documentation":"Parses the accord.fast_path table strategy string from configuration. Only 'keyspace', 'simple', 'up', or a JSON-ish map form {'size':n,'dcs':...} is accepted; any other string raises a ConfigurationException at strategy parsing time. This fails fast on invalid config so the cluster does not start with an unusable fast-path policy.","triggerScenarios":"Calling tableStrategyFromString with a string that matches none of 'keyspace', 'simple', 'up', nor a valid map spec — typically a typo like 'KeySpace' with different casing/handling, or a malformed map string.","commonSituations":"Typo in cassandra.yaml accord.fast_path setting; quoting/escaping issues in YAML mangling the map syntax; copy-pasting a keyspace-allowed keyword that the table strategy parser does not accept.","solutions":["Set the strategy to one of: keyspace, simple, up, or a well-formed {'size':n,'dcs':dc0,dc1...} string.","Check spelling and remove stray whitespace or quotes introduced by YAML.","Validate the config with a startup dry-run after editing cassandra.yaml."],"exampleFix":"// before (cassandra.yaml)\naccord:\n  fast_path:\n    table_strategy: 'KeySpace '\n// after\naccord:\n  fast_path:\n    table_strategy: keyspace","handlingStrategy":"validation","validationCode":"String s = value.trim().toLowerCase();\nboolean ok = s.equals(\"keyspace\") || s.equals(\"simple\") || s.equals(\"up\")\n    || s.matches(\"\\\\{'size'\\\\s*:\\\\s*\\\\d+\\\\s*(,\\\\s*'dcs'\\\\s*:\\\\s*[^}]+)?\\\\}\");\nif (!ok) throw new ConfigurationException(\"Invalid fast_path table strategy: \" + value);","typeGuard":null,"tryCatchPattern":"try {\n    FastPathStrategy strategy = FastPathStrategy.tableStrategyFromString(raw);\n} catch (ConfigurationException e) {\n    logger.error(\"Bad accord.fast_path config; falling back to default\", e);\n    strategy = FastPathStrategy.simple();\n}","preventionTips":["Validate cassandra.yaml fast_path settings on config load","Avoid quotes/whitespace mangling in YAML string values","Copy only documented strategy strings","Test config changes in a staging cluster first"],"tags":["configuration","accord","fast-path"],"backgroundTag":"invalid-config-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"}