{"record":{"id":"6e2c48db81f6c398","repo":"apache/cassandra","slug":"not-updating-range-tombstone-resize-factor-as-grow","errorCode":null,"errorMessage":"Not updating range_tombstone_resize_factor as growth factor must be in the range [1.2, 5.0] inclusive","messagePattern":"Not updating range_tombstone_resize_factor as growth factor must be in the range \\[1\\.2, 5\\.0\\] inclusive","errorType":"validation","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/StorageService.java","lineNumber":5025,"sourceCode":"        if (size < 0 || size > 1024)\n        {\n            throw new IllegalStateException(\"Not updating initial_range_tombstone_allocation_size as it must be in the range [0, 1024] inclusive\");\n        }\n        int originalSize = DatabaseDescriptor.getInitialRangeTombstoneListAllocationSize();\n        DatabaseDescriptor.setInitialRangeTombstoneListAllocationSize(size);\n        logger.info(\"Updated initial_range_tombstone_allocation_size from {} to {}\", originalSize, size);\n    }\n\n    public double getRangeTombstoneResizeListGrowthFactor()\n    {\n        return DatabaseDescriptor.getRangeTombstoneListGrowthFactor();\n    }\n\n    public void setRangeTombstoneListResizeGrowthFactor(double growthFactor) throws IllegalStateException\n    {\n        if (growthFactor < 1.2 || growthFactor > 5)\n        {\n            throw new IllegalStateException(\"Not updating range_tombstone_resize_factor as growth factor must be in the range [1.2, 5.0] inclusive\");\n        }\n        else\n        {\n            double originalGrowthFactor = DatabaseDescriptor.getRangeTombstoneListGrowthFactor();\n            DatabaseDescriptor.setRangeTombstoneListGrowthFactor(growthFactor);\n            logger.info(\"Updated range_tombstone_resize_factor from {} to {}\", originalGrowthFactor, growthFactor);\n        }\n    }\n\n    public void setHintedHandoffThrottleInKB(int throttleInKB)\n    {\n        DatabaseDescriptor.setHintedHandoffThrottleInKiB(throttleInKB);\n        logger.info(\"updated hinted_handoff_throttle to {} KiB\", throttleInKB);\n    }\n\n    public boolean getTransferHintsOnDecommission()\n    {\n        return DatabaseDescriptor.getTransferHintsOnDecommission();","sourceCodeStart":5007,"sourceCodeEnd":5043,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StorageService.java#L5007-L5043","documentation":"setRangeTombstoneListResizeGrowthFactor() sets the growth factor used when RangeTombstoneList resizes. It throws IllegalStateException when the factor is outside the inclusive range [1.2, 5.0]; the current setting is left unchanged.","triggerScenarios":"Calling StorageService.setRangeTombstoneListResizeGrowthFactor(growthFactor) with growthFactor < 1.2 or > 5.0 via JMX, nodetool, or code.","commonSituations":"Passing 1.0 or 1.1 (no-growth intuitions), or 10 (thinking it is a multiplier cap); unit confusion with percentage values like 50 meaning 50%.","solutions":["Supply a double in [1.2, 5.0] inclusive (e.g., 2.0).","Read the current factor first and clamp computed values to the bounds before calling.","Clamp: Math.max(1.2, Math.min(5.0, factor))."],"exampleFix":"// before\nss.setRangeTombstoneListResizeGrowthFactor(10.0); // rejected\n// after\nss.setRangeTombstoneListResizeGrowthFactor(2.0);","handlingStrategy":"validation","validationCode":"if (growthFactor < 1.2 || growthFactor > 5.0) throw new IllegalArgumentException(\"growth factor must be in [1.2,5.0]\");\nss.setRangeTombstoneListResizeGrowthFactor(growthFactor);","typeGuard":"boolean validFactor = Double.isFinite(growthFactor) && growthFactor >= 1.2 && growthFactor <= 5.0;","tryCatchPattern":"try { ss.setRangeTombstoneListResizeGrowthFactor(f); } catch (IllegalStateException e) { log.warn(\"invalid growth factor {}\", f, e); }","preventionTips":["Validate the [1.2, 5.0] inclusive range before calling.","Clamp: Math.max(1.2, Math.min(5.0, f)).","Beware percent-style values (50) versus multipliers (1.5).","Read the current factor to gauge sensible values."],"tags":["jmx","configuration","validation"],"backgroundTag":"value-out-of-range","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}