{"record":{"id":"baf0534b9d3a5d0a","repo":"apache/cassandra","slug":"transient-replication-is-disabled-enable-in-cassa","errorCode":null,"errorMessage":"Transient replication is disabled. Enable in cassandra.yaml to use.","messagePattern":"Transient replication is disabled\\. Enable in cassandra\\.yaml to use\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/locator/AbstractReplicationStrategy.java","lineNumber":332,"sourceCode":"        {\n            // If the subclass doesn't specify a prepareOptions method, then that means that it\n            // doesn't want to do anything to the options. So do nothing on reflection related exceptions.\n        }\n    }\n\n    public static void validateReplicationStrategy(String keyspaceName,\n                                                   Class<? extends AbstractReplicationStrategy> strategyClass,\n                                                   ClusterMetadata metadata,\n                                                   Map<String, String> strategyOptions,\n                                                   ClientState state) throws ConfigurationException\n    {\n        AbstractReplicationStrategy strategy = createInternal(keyspaceName, strategyClass, strategyOptions);\n        strategy.validateExpectedOptions(metadata);\n        strategy.validateOptions();\n        strategy.maybeWarnOnOptions(state);\n        if (strategy.hasTransientReplicas() && !DatabaseDescriptor.isTransientReplicationEnabled())\n        {\n            throw new ConfigurationException(\"Transient replication is disabled. Enable in cassandra.yaml to use.\");\n        }\n    }\n\n    public static Class<AbstractReplicationStrategy> getClass(String cls) throws ConfigurationException\n    {\n        String className = cls.contains(\".\") ? cls : \"org.apache.cassandra.locator.\" + cls;\n\n        if (\"org.apache.cassandra.locator.OldNetworkTopologyStrategy\".equals(className)) // see CASSANDRA-16301 \n            throw new ConfigurationException(\"The support for the OldNetworkTopologyStrategy has been removed in C* version 4.0. The keyspace strategy should be switch to NetworkTopologyStrategy\");\n\n        @SuppressWarnings(\"unchecked\")\n        Class<AbstractReplicationStrategy> strategyClass =\n            (Class<AbstractReplicationStrategy>) FBUtilities.classForNameWithoutInitialization(className,\n                                                                                             \"replication strategy\",\n                                                                                             AbstractReplicationStrategy.class);\n        return strategyClass;\n    }\n","sourceCodeStart":314,"sourceCodeEnd":350,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/locator/AbstractReplicationStrategy.java#L314-L350","documentation":"validateReplicationStrategy rejects any strategy whose replication factor includes transient replicas (e.g. '3/1') when transient replication is not enabled via transient_replication_enabled in cassandra.yaml. The error tells you the feature flag is off, so a keyspace with transient replication cannot be created or altered.","triggerScenarios":"CREATE/ALTER KEYSPACE with a replication factor containing a transient portion (e.g. {'class':'SimpleStrategy','replication_factor':'3/1'}) while DatabaseDescriptor.isTransientReplicationEnabled() is false (default).","commonSituations":"Trying experimental transient replication (CASSANDRA-14459 family) without enabling it in config; copying example keyspaces using '/N' RF syntax onto a cluster with default config.","solutions":["Enable transient_replication_enabled: true in cassandra.yaml and restart the cluster (must be enabled on ALL nodes)","Remove the transient portion from the RF (use '3' instead of '3/1') if transient reads are not needed","Confirm no other keyspaces use transient RF before toggling the flag","Note transient replication is experimental; consider a plain RF for production"],"exampleFix":"// before (cassandra.yaml)\n# transient_replication_enabled: false\n// after\ntransient_replication_enabled: true","handlingStrategy":"validation","validationCode":"// Before using a transient RF, check the flag\nString rf = \"3/1\";\nif (rf.contains(\"/\") && !Boolean.parseBoolean(config.getString(\"transient_replication_enabled\", \"false\")))\n    throw new IllegalArgumentException(\"Enable transient_replication_enabled in cassandra.yaml first\");","typeGuard":null,"tryCatchPattern":"try {\n    session.execute(createKeyspaceWithTransientRf);\n} catch (ConfigurationException e) {\n    logger.error(\"Transient replication rejected: {}\", e.getMessage());\n}","preventionTips":["Enable transient_replication_enabled on every node before creating transient keyspaces","Only use '/N' RF syntax when the feature flag is set","Remember transient replication is experimental — test thoroughly","Document the flag in cluster config runbooks"],"tags":["configuration","replication","feature-flag","transient-replication"],"backgroundTag":"feature-not-enabled","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"}