{"record":{"id":"472f26270fdcca39","repo":"apache/cassandra","slug":"fast-path-strategy-must-either-be-simple-up-o","errorCode":null,"errorMessage":"Fast path strategy must either be 'simple', 'up' or a map size and optional dcs {'size':n, 'dcs': dc0,dc1...","messagePattern":"Fast path strategy must either be '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":147,"sourceCode":"        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\n    static FastPathStrategy up()\n    {\n        return UpFastPathStrategy.instance;\n    }\n\n    static FastPathStrategy inheritKeyspace()\n    {\n        return InheritKeyspaceFastPathStrategy.instance;\n    }\n\n    MetadataSerializer<FastPathStrategy> serializer = new MetadataSerializer<FastPathStrategy>()","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/accord/topology/FastPathStrategy.java#L129-L165","documentation":"Parses the accord.fast_path keyspace strategy string. Only 'simple', 'up', or a map form {'size':n,'dcs':...} is accepted (note: unlike the table strategy, 'keyspace' itself is not allowed here since it would be recursive); anything else throws ConfigurationException. It fails fast at configuration parse time.","triggerScenarios":"Calling keyspaceStrategyFromString with a string other than 'simple', 'up', or a valid map spec — e.g. setting the keyspace strategy to 'keyspace', or a typo/malformed map.","commonSituations":"Setting the per-keyspace fast path strategy to 'keyspace' by mistake (valid only for the table strategy); typos in cassandra.yaml or in ALTER statements configuring keyspace fast path; YAML quoting mangling the map syntax.","solutions":["Use 'simple', 'up', or a well-formed {'size':n,'dcs':dc0,dc1...} string for the keyspace strategy.","Remove 'keyspace' as the value here — it is only valid for the table strategy.","Re-check the config after edits and restart/validate to confirm parsing succeeds."],"exampleFix":"// before\nfast_path_strategy: keyspace\n// after\nfast_path_strategy: simple","handlingStrategy":"validation","validationCode":"String s = value.trim().toLowerCase();\nboolean ok = s.equals(\"simple\") || s.equals(\"up\")\n    || s.matches(\"\\\\{'size'\\\\s*:\\\\s*\\\\d+\\\\s*(,\\\\s*'dcs'\\\\s*:\\\\s*[^}]+)?\\\\}\");\nif (!ok) throw new ConfigurationException(\"Invalid keyspace fast_path strategy: \" + value);","typeGuard":null,"tryCatchPattern":"try {\n    FastPathStrategy strategy = FastPathStrategy.keyspaceStrategyFromString(raw);\n} catch (ConfigurationException e) {\n    logger.error(\"Bad keyspace fast_path strategy; using default\", e);\n    strategy = FastPathStrategy.simple();\n}","preventionTips":["Remember 'keyspace' is not a valid value for the keyspace-level strategy","Validate strategy strings before applying via ALTER or config","Trim and lowercase input before comparison"],"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"}