{"record":{"id":"cf50212555216adc","repo":"apache/cassandra","slug":"default-keyspace-rf-d-cannot-be-less-than-minim","errorCode":null,"errorMessage":"default_keyspace_rf (%d) cannot be less than minimum_replication_factor_fail_threshold (%d)","messagePattern":"default_keyspace_rf \\((.+?)\\) cannot be less than minimum_replication_factor_fail_threshold \\((.+?)\\)","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":1231,"sourceCode":"                throw new ConfigurationException(\"internode_max_message_size must no exceed internode_application_send_queue_reserve_endpoint_capacity\", false);\n\n            if (maxMessageSize > conf.internode_application_send_queue_reserve_global_capacity.toBytes())\n                throw new ConfigurationException(\"internode_max_message_size must no exceed internode_application_send_queue_reserve_global_capacity\", false);\n        }\n        else\n        {\n            long maxMessageSizeInBytes =\n            Math.min(conf.internode_application_receive_queue_reserve_endpoint_capacity.toBytes(),\n                     conf.internode_application_send_queue_reserve_endpoint_capacity.toBytes());\n\n            conf.internode_max_message_size = new DataStorageSpec.IntBytesBound(maxMessageSizeInBytes);\n        }\n\n        validateMaxConcurrentAutoUpgradeTasksConf(conf.max_concurrent_automatic_sstable_upgrades);\n\n        if (conf.default_keyspace_rf < conf.minimum_replication_factor_fail_threshold)\n        {\n            throw new ConfigurationException(String.format(\"default_keyspace_rf (%d) cannot be less than minimum_replication_factor_fail_threshold (%d)\",\n                                                           conf.default_keyspace_rf, conf.minimum_replication_factor_fail_threshold));\n        }\n\n        if (conf.paxos_repair_parallelism <= 0)\n            conf.paxos_repair_parallelism = Math.max(1, conf.concurrent_writes / 8);\n\n        Paxos.setPaxosVariant(conf.paxos_variant);\n        if (conf.paxos_state_purging == null)\n            conf.paxos_state_purging = PaxosStatePurging.legacy;\n\n        logInitializationOutcome(logger);\n\n        if (conf.max_space_usable_for_compactions_in_percentage < 0 || conf.max_space_usable_for_compactions_in_percentage > 1)\n            throw new ConfigurationException(\"max_space_usable_for_compactions_in_percentage must be between 0 and 1\", false);\n\n        if (conf.dump_heap_on_uncaught_exception && DatabaseDescriptor.getHeapDumpPath() == null)\n            throw new ConfigurationException(String.format(\"Invalid configuration. Heap dump is enabled but cannot create heap dump output path: %s.\", conf.heap_dump_path != null ? conf.heap_dump_path : \"null\"));\n","sourceCodeStart":1213,"sourceCodeEnd":1249,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L1213-L1249","documentation":"DatabaseDescriptor requires default_keyspace_rf (default replication factor for new keyspaces) to be at least the minimum_replication_factor_fail_threshold. The throw fires when default_keyspace_rf is set below that fail threshold, an inconsistent pair that would make default keyspaces immediately fail RF validation.","triggerScenarios":"applySimpleConfig (via toolInitialization/applyAll) with conf.default_keyspace_rf < conf.minimum_replication_factor_fail_threshold in cassandra.yaml.","commonSituations":"Operator raises minimum_replication_factor_fail_threshold for safety without checking default_keyspace_rf; setting a low default RF while enforcing a strict minimum RF policy.","solutions":["Raise default_keyspace_rf in cassandra.yaml so it is >= minimum_replication_factor_fail_threshold","Lower minimum_replication_factor_fail_threshold to at most default_keyspace_rf"],"exampleFix":"// before (cassandra.yaml)\ndefault_keyspace_rf: 2\nminimum_replication_factor_fail_threshold: 3\n// after\ndefault_keyspace_rf: 3\nminimum_replication_factor_fail_threshold: 3","handlingStrategy":"validation","validationCode":"if (conf.default_keyspace_rf < conf.minimum_replication_factor_fail_threshold) throw new IllegalArgumentException(\"default_keyspace_rf must be >= minimum_replication_factor_fail_threshold\");","typeGuard":null,"tryCatchPattern":"try { DatabaseDescriptor.applyAll(config); } catch (ConfigurationException e) { log.error(\"Inconsistent RF settings\", e); }","preventionTips":["When changing minimum_replication_factor_fail_threshold, audit default_keyspace_rf in the same change","Use simple_replication_factor-related settings together as a pair in config reviews"],"tags":["cassandra","configuration","replication"],"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"}