{"record":{"id":"2a8b329f1e0dddcc","repo":"apache/cassandra","slug":"cannot-use-keyspace-inheriting-fast-path-strategy","errorCode":null,"errorMessage":"Cannot use keyspace inheriting fast path strategy with keyspaces","messagePattern":"Cannot use keyspace inheriting fast path strategy with keyspaces","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/cql3/statements/schema/KeyspaceAttributes.java","lineNumber":61,"sourceCode":"        ImmutableSet.Builder<String> validBuilder = ImmutableSet.builder();\n        for (Option option : Option.values())\n            validBuilder.add(option.toString());\n        validKeywords = validBuilder.build();\n        obsoleteKeywords = ImmutableSet.of();\n        requiredKeywords = ImmutableSet.of(Option.REPLICATION.toString());\n    }\n\n    public void validate()\n    {\n        validate(validKeywords, obsoleteKeywords);\n\n        Map<String, String> replicationOptions = getAllReplicationOptions();\n        if (!replicationOptions.isEmpty() && !replicationOptions.containsKey(ReplicationParams.CLASS))\n            throw new ConfigurationException(\"Missing replication strategy class\");\n\n        FastPathStrategy strategy = getFastPathStrategy();\n        if (strategy != null && strategy.kind() == FastPathStrategy.Kind.INHERIT_KEYSPACE)\n            throw new ConfigurationException(\"Cannot use keyspace inheriting fast path strategy with keyspaces\");\n    }\n    \n    public static Set<String> allKeywords()\n    {\n        return Sets.union(validKeywords, obsoleteKeywords);\n    }\n\n    public static Set<String> requiredKeywords()\n    {\n        return requiredKeywords;\n    }\n\n    public String getReplicationStrategyClass()\n    {\n        return getAllReplicationOptions().get(ReplicationParams.CLASS);\n    }\n\n    private Map<String, String> getAllReplicationOptions()","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/cql3/statements/schema/KeyspaceAttributes.java#L43-L79","documentation":"The 'INHERIT_KEYSPACE' fast-path replication strategy kind is only meaningful inside a user-defined type context, not as a keyspace-level replication strategy. KeyspaceAttributes.validate() rejects attempts to set it on a keyspace with ConfigurationException.","triggerScenarios":"CREATE/ALTER KEYSPACE with a fast path strategy option whose kind resolves to INHERIT_KEYSPACE (getFastPathStrategy() returns that kind).","commonSituations":"Copying strategy definitions from vector/type schema into keyspace DDL; misconfigured cqlsh scripts or tooling emitting the inherit-keyspace kind at keyspace level.","solutions":["Use a concrete strategy (SimpleStrategy/NetworkTopologyStrategy) for the keyspace","Remove the fast path strategy option from the CREATE/ALTER KEYSPACE statement"],"exampleFix":"// before\nCREATE KEYSPACE ks WITH replication = {'class': 'FastPathStrategy', 'kind': 'INHERIT_KEYSPACE'};\n// after\nCREATE KEYSPACE ks WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': 3};","handlingStrategy":"validation","validationCode":"if (replication['class'] === 'FastPathStrategy' && replication.kind === 'INHERIT_KEYSPACE') {\n  throw new Error('INHERIT_KEYSPACE strategy kind is not valid for keyspaces');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use INHERIT_KEYSPACE kind only in type/UDT contexts","Map keyspace-level strategies to concrete SimpleStrategy/NetworkTopologyStrategy","Validate strategy enums against keyspace-allowed values"],"tags":["cql","keyspace","replication","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}