{"record":{"id":"b2008b250fbcc916","repo":"apache/cassandra","slug":"memtable-cleanup-threshold-has-been-deprecated-and","errorCode":null,"errorMessage":"memtable_cleanup_threshold has been deprecated and should be removed from cassandra.yaml","messagePattern":"memtable_cleanup_threshold has been deprecated and should be removed from cassandra\\.yaml","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":952,"sourceCode":"            throw new ConfigurationException(\"saved_caches_directory must not be the same as the hints_directory\", false);\n\n        initializeBackgroundWriteDiskAccessMode();\n\n        if (conf.memtable_flush_writers == 0)\n        {\n            conf.memtable_flush_writers = conf.data_file_directories.length == 1 ? 2 : 1;\n        }\n\n        if (conf.memtable_flush_writers < 1)\n            throw new ConfigurationException(\"memtable_flush_writers must be at least 1, but was \" + conf.memtable_flush_writers, false);\n\n        if (conf.memtable_cleanup_threshold == null)\n        {\n            conf.memtable_cleanup_threshold = (float) (1.0 / (1 + conf.memtable_flush_writers));\n        }\n        else\n        {\n            logger.warn(\"memtable_cleanup_threshold has been deprecated and should be removed from cassandra.yaml\");\n        }\n\n        if (conf.memtable_cleanup_threshold < 0.01f)\n            throw new ConfigurationException(\"memtable_cleanup_threshold must be >= 0.01, but was \" + conf.memtable_cleanup_threshold, false);\n        if (conf.memtable_cleanup_threshold > 0.99f)\n            throw new ConfigurationException(\"memtable_cleanup_threshold must be <= 0.99, but was \" + conf.memtable_cleanup_threshold, false);\n        if (conf.memtable_cleanup_threshold < 0.1f)\n            logger.warn(\"memtable_cleanup_threshold is set very low [{}], which may cause performance degradation\", conf.memtable_cleanup_threshold);\n\n        if (conf.concurrent_compactors == null)\n            conf.concurrent_compactors = Math.min(8, Math.max(2, Math.min(FBUtilities.getAvailableProcessors(), conf.data_file_directories.length)));\n\n        if (conf.concurrent_compactors <= 0)\n            throw new ConfigurationException(\"concurrent_compactors should be strictly greater than 0, but was \" + conf.concurrent_compactors, false);\n\n        applyConcurrentValidations(conf);\n        applyRepairCommandPoolSize(conf);\n        applyThresholdsValidations(conf);","sourceCodeStart":934,"sourceCodeEnd":970,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L934-L970","documentation":"A deprecation warning logged when memtable_cleanup_threshold is explicitly set in cassandra.yaml. The setting was removed in favor of memtable heap/off-heap space thresholds; Cassandra ignores the explicit value except for legacy bounds checks and tells the operator to delete it from the YAML. Startup continues.","triggerScenarios":"Starting a node with memtable_cleanup_threshold present in cassandra.yaml; applySimpleConfig detects the non-null value during applyAll/toolInitialization.","commonSituations":"Upgrading from older Cassandra versions (pre-3.x era configs carried forward); copied yaml templates from old clusters; merged config files retaining removed keys.","solutions":["Remove the memtable_cleanup_threshold line from cassandra.yaml and restart.","If tuning is needed, use memtable_space (heap) / memtable_offheap_space instead of the deprecated threshold."],"exampleFix":"// cassandra.yaml before\nmemtable_cleanup_threshold: 0.25\n// after (line removed; use modern option if tuning is needed)\n# memtable_cleanup_threshold removed - deprecated\nmemtable_space: 2048MiB","handlingStrategy":"validation","validationCode":"// grep the yaml before rollout\nif (yamlConfig.containsKey(\"memtable_cleanup_threshold\")) {\n    throw new IllegalStateException(\"Remove deprecated memtable_cleanup_threshold from cassandra.yaml\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Diff cassandra.yaml against the current version's conf/cassandra.yaml template before upgrades","Remove settings as they are deprecated rather than leaving them for later","Run config linting in CI for Cassandra yaml files"],"tags":["cassandra","configuration","deprecation","yaml"],"backgroundTag":"deprecated-api-usage","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"}