{"record":{"id":"adc278f35dee3fed","repo":"apache/cassandra","slug":"concurrent-compactors-should-be-strictly-greater-t","errorCode":null,"errorMessage":"concurrent_compactors should be strictly greater than 0, but was ${conf.concurrent_compactors}","messagePattern":"concurrent_compactors should be strictly greater than 0, but was (.+?)","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":966,"sourceCode":"            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);\n\n        if (conf.concurrent_materialized_view_builders <= 0)\n            throw new ConfigurationException(\"concurrent_materialized_view_builders should be strictly greater than 0, but was \" + conf.concurrent_materialized_view_builders, false);\n\n        if (conf.num_tokens != null && conf.num_tokens > MAX_NUM_TOKENS)\n            throw new ConfigurationException(String.format(\"A maximum number of %d tokens per node is supported\", MAX_NUM_TOKENS), false);\n\n        try\n        {\n            // if prepared_statements_cache_size option was set to \"auto\" then size of the cache should be \"max(1/256 of Heap (in MiB), 10MiB)\"\n            preparedStatementsCacheSizeInMiB = (conf.prepared_statements_cache_size == null)\n                                               ? Math.max(10, (int) (Runtime.getRuntime().maxMemory() / 1024 / 1024 / 256))\n                                               : conf.prepared_statements_cache_size.toMebibytes();\n","sourceCodeStart":948,"sourceCodeEnd":984,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L948-L984","documentation":"concurrent_compactors controls the number of simultaneous compaction threads; Cassandra validates it is strictly greater than 0 at startup in applySimpleConfig. A zero or negative value would disable compaction entirely and break the node's write path bookkeeping, so ConfigurationException is thrown.","triggerScenarios":"Node startup with concurrent_compactors: 0 or a negative integer in cassandra.yaml.","commonSituations":"Operator trying to 'disable' compaction by setting 0; templating bug that renders an empty/0 value; tuning experiment left in the config.","solutions":["Edit cassandra.yaml and set concurrent_compactors to a positive integer (default is min(8, max(2, cores, data dirs)))","Remove the key to use the computed default","To throttle compaction instead of disabling it, tune compaction_throughput rather than setting 0","Restart the node"],"exampleFix":"// before (cassandra.yaml)\nconcurrent_compactors: 0\n// after\nconcurrent_compactors: 4","handlingStrategy":"validation","validationCode":"if (conf.concurrentCompactors != null && conf.concurrentCompactors <= 0)\n    throw new IllegalArgumentException(\"concurrent_compactors must be > 0\");","typeGuard":null,"tryCatchPattern":"try { DatabaseDescriptor.daemonInitialization(); }\ncatch (ConfigurationException e) { LOG.fatal(e.getMessage()); System.exit(1); }","preventionTips":["Never set concurrent_compactors to 0 to disable compaction; tune compaction_throughput instead","Omit the key to use the computed default","Test generated configs on a single-node dev cluster first"],"tags":["cassandra","configuration","compaction"],"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"}