{"record":{"id":"fd211c2fb94e5433","repo":"apache/cassandra","slug":"not-updating-initial-range-tombstone-allocation-si","errorCode":null,"errorMessage":"Not updating initial_range_tombstone_allocation_size as it must be in the range [0, 1024] inclusive","messagePattern":"Not updating initial_range_tombstone_allocation_size as it must be in the range \\[0, 1024\\] inclusive","errorType":"validation","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/StorageService.java","lineNumber":5009,"sourceCode":"        }\n        catch (ConfigurationException e)\n        {\n            throw new IllegalArgumentException(e.getMessage());\n        }\n\n        logger.info(\"Updated batch_size_warn_threshold to {}\", thresholdInKiB);\n    }\n\n    public int getInitialRangeTombstoneListAllocationSize()\n    {\n        return DatabaseDescriptor.getInitialRangeTombstoneListAllocationSize();\n    }\n\n    public void setInitialRangeTombstoneListAllocationSize(int size)\n    {\n        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","sourceCodeStart":4991,"sourceCodeEnd":5027,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StorageService.java#L4991-L5027","documentation":"setInitialRangeTombstoneListAllocationSize() is a JMX-exposed setter for the preallocation size of RangeTombstoneList structures. It throws IllegalStateException when the supplied size is outside the inclusive range [0, 1024], and does not apply the change.","triggerScenarios":"Calling StorageService.setInitialRangeTombstoneListAllocationSize(size) with size < 0 or size > 1024 via nodetool, JMX, or code.","commonSituations":"Typo in tuning scripts (e.g., passing a byte value like 4096 instead of a list size); copy-pasting a memory-size figure into a list-size knob; negative value from a script default.","solutions":["Pass an integer between 0 and 1024 inclusive (e.g., 16 or 64).","Check the current value with DatabaseDescriptor.getInitialRangeTombstoneListAllocationSize() before tuning.","If you need larger effect, tune range_tombstone_resize_factor instead, within its [1.2, 5.0] bounds."],"exampleFix":"// before\nss.setInitialRangeTombstoneListAllocationSize(4096); // rejected\n// after\nss.setInitialRangeTombstoneListAllocationSize(64);","handlingStrategy":"validation","validationCode":"if (size < 0 || size > 1024) throw new IllegalArgumentException(\"size must be in [0,1024]\");\nss.setInitialRangeTombstoneListAllocationSize(size);","typeGuard":"boolean validSize = size >= 0 && size <= 1024;","tryCatchPattern":"try { ss.setInitialRangeTombstoneListAllocationSize(size); } catch (IllegalStateException e) { log.warn(\"invalid size {}\", size, e); }","preventionTips":["Validate the [0,1024] bound before calling.","Clamp scripted/computed values to the range.","Read the current value before tuning to sanity-check magnitude.","Remember this is a list size, not a byte/KB memory figure."],"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"}