{"record":{"id":"0497351f8a5cc773","repo":"apache/cassandra","slug":"write-thresholds-require-top-partitions-tracking-t","errorCode":null,"errorMessage":"Write thresholds require top partitions tracking to be enabled","messagePattern":"Write thresholds require top partitions tracking to be enabled","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":1359,"sourceCode":"\n    @VisibleForTesting\n    static void applyRepairCommandPoolSize(Config config)\n    {\n        if (config.repair_command_pool_size < 1)\n            config.repair_command_pool_size = config.concurrent_validations;\n    }\n\n    @VisibleForTesting\n    static void applyThresholdsValidations(Config config)\n    {\n        // Validate read thresholds\n        validateReadThresholds(\"coordinator_read_size\", config.coordinator_read_size_warn_threshold, config.coordinator_read_size_fail_threshold);\n        validateReadThresholds(\"local_read_size\", config.local_read_size_warn_threshold, config.local_read_size_fail_threshold);\n        validateReadThresholds(\"row_index_read_size\", config.row_index_read_size_warn_threshold, config.row_index_read_size_fail_threshold);\n\n        // Write threshold warning depends on top_partitions tracking\n        if (config.write_thresholds_enabled && !config.top_partitions_enabled)\n            logger.warn(\"Write thresholds require top partitions tracking to be enabled\");\n\n        validateWriteSizeThreshold(config.write_size_warn_threshold, config.min_tracked_partition_size);\n        validateWriteTombstoneThresholdRange(config.write_tombstone_warn_threshold, config.min_tracked_partition_tombstone_count);\n    }\n\n    private static void validateReadThresholds(String name, DataStorageSpec.LongBytesBound warn, DataStorageSpec.LongBytesBound fail)\n    {\n        if (fail != null && warn != null && fail.toBytes() < warn.toBytes())\n            throw new ConfigurationException(String.format(\"%s (%s) must be greater than or equal to %s (%s)\",\n                                                           name + \"_fail_threshold\", fail,\n                                                           name + \"_warn_threshold\", warn));\n    }\n\n    private static void validateWriteSizeThreshold(DataStorageSpec.LongBytesBound writeSizeWarn, DataStorageSpec.LongBytesBound minTrackedSize)\n    {\n        if (writeSizeWarn != null && minTrackedSize != null)\n        {\n            if (writeSizeWarn.toBytes() < minTrackedSize.toBytes())","sourceCodeStart":1341,"sourceCodeEnd":1377,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L1341-L1377","documentation":"Cassandra emits this warning at startup config validation when write size/tombstone thresholds are enabled but top-partition tracking (top_partitions_enabled) is off. Write thresholds are enforced using top-partition tracking data, so without it they cannot function. It is a non-fatal warning logged by DatabaseDescriptor during config sanity checks.","triggerScenarios":"cassandra.yaml sets write_thresholds_enabled: true (or write_size_warn_threshold/write_tombstone_warn_threshold are set) while top_partitions_enabled is not set to true. Also occurs via validateThresholds() when the user table write thresholds were configured without enabling top partition tracking.","commonSituations":"Operators enabling the newer write-size warning thresholds after upgrading, but missing the prerequisite top_partitions_enabled flag; copy-pasted yaml snippets where only half the required flags were carried over.","solutions":["Set top_partitions_enabled: true in cassandra.yaml alongside write_thresholds_enabled","If top-partition tracking overhead is not wanted, set write_thresholds_enabled: false (or remove the write threshold settings)","Restart Cassandra and confirm the warning is gone from the log"],"exampleFix":"// cassandra.yaml before\nwrite_thresholds_enabled: true\n// after\nwrite_thresholds_enabled: true\ntop_partitions_enabled: true","handlingStrategy":"validation","validationCode":"if (DatabaseDescriptor.getWriteThresholdsEnabled() && !DatabaseDescriptor.getTopPartitionsEnabled()) System.err.println(\"Enable top_partitions_enabled before write thresholds\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set top_partitions_enabled: true together with write_thresholds_enabled","Grep yaml templates for write_thresholds_enabled and pair the flags","Validate config in CI by starting a node in test mode and checking logs for warnings"],"tags":["cassandra","configuration","startup-validation"],"backgroundTag":"conflicting-config-options","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"}