{"record":{"id":"5e3ed1a1df8cca13","repo":"apache/cassandra","slug":"unrecognized-strategy-option-s-passed-to-s-for","errorCode":null,"errorMessage":"Unrecognized strategy option {%s} passed to %s for keyspace %s. Expected options: %s","messagePattern":"Unrecognized strategy option (.+?) passed to (.+?) for keyspace (.+?)\\. Expected options: (.+?)","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/locator/AbstractReplicationStrategy.java","lineNumber":394,"sourceCode":"        validateExpectedOptions(snapshot);\n        validateOptions();\n        maybeWarnOnOptions();\n        if (hasTransientReplicas() && !DatabaseDescriptor.isTransientReplicationEnabled())\n        {\n            throw new ConfigurationException(\"Transient replication is disabled. Enable in cassandra.yaml to use.\");\n        }\n    }\n\n    public void validateExpectedOptions(ClusterMetadata snapshot) throws ConfigurationException\n    {\n        Collection<String> expectedOptions = recognizedOptions(snapshot);\n        if (expectedOptions == null)\n            return;\n\n        for (String key : configOptions.keySet())\n        {\n            if (!expectedOptions.contains(key))\n                throw new ConfigurationException(String.format(\"Unrecognized strategy option {%s} passed to %s for keyspace %s. Expected options: %s\", key, getClass().getSimpleName(), keyspaceName, expectedOptions));\n        }\n    }\n}\n","sourceCodeStart":376,"sourceCodeEnd":398,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/locator/AbstractReplicationStrategy.java#L376-L398","documentation":"Thrown by AbstractReplicationStrategy.validateExpectedOptions() when a keyspace's replication strategy options (configOptions) contain a key the strategy class does not recognize for the current cluster metadata. It names the offending option, the strategy class, the keyspace, and the set of expected options.","triggerScenarios":"CREATE/ALTER KEYSPACE passing a strategy_options entry (e.g. a misspelled datacenter name in NetworkTopologyStrategy, or 'replication_factor' on NetworkTopologyStrategy) that is not in recognizedOptions(snapshot); validate() calls validateExpectedOptions on every strategy validation.","commonSituations":"Typos in DC names that don't exist in the cluster; leftover SimpleStrategy-style 'replication_factor' option on NetworkTopologyStrategy; renamed or removed datacenters after decommissioning.","solutions":["Compare the option key against the list printed in the message (Expected options) and fix the typo or remove the stale option","Ensure datacenter names in NetworkTopologyStrategy exactly match datacenter names reported by nodetool status","Use ALTER KEYSPACE to correct the replication map"],"exampleFix":"// before\nCREATE KEYSPACE ks WITH replication = {'class':'NetworkTopologyStrategy','dc-1 ':3};\n\n// after (option key must match a real DC)\nCREATE KEYSPACE ks WITH replication = {'class':'NetworkTopologyStrategy','datacenter1':3};","handlingStrategy":"validation","validationCode":"Set<String> expected = strategy.recognizedOptions(snapshot);\nfor (String key : options.keySet())\n    if (!expected.contains(key)) throw new IllegalArgumentException(\"Unknown option: \" + key);","typeGuard":null,"tryCatchPattern":"try { AbstractReplicationStrategy.validateReplicationStrategy(...); } catch (ConfigurationException e) { /* correct option keys per message */ }","preventionTips":["Copy datacenter names from nodetool status, never type them from memory","After DC renames/decommissions, audit keyspace replication options","Use schema validation tooling before applying CREATE/ALTER KEYSPACE"],"tags":["configuration","replication","validation"],"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-14T16:17:12.679Z"}