apache/cassandra · error · IllegalStateException
Not updating initial_range_tombstone_allocation_size as it…
Error message
Not updating initial_range_tombstone_allocation_size as it must be in the range [0, 1024] inclusive
What it means
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.
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.
Example fix
// before ss.setInitialRangeTombstoneListAllocationSize(4096); // rejected // after ss.setInitialRangeTombstoneListAllocationSize(64);
Defensive patterns
Strategy: validation
Validate before calling
if (size < 0 || size > 1024) throw new IllegalArgumentException("size must be in [0,1024]");
ss.setInitialRangeTombstoneListAllocationSize(size); Type guard
boolean validSize = size >= 0 && size <= 1024;
Try / catch
try { ss.setInitialRangeTombstoneListAllocationSize(size); } catch (IllegalStateException e) { log.warn("invalid size {}", size, e); } Prevention
- 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.
When it happens
Trigger: Calling StorageService.setInitialRangeTombstoneListAllocationSize(size) with size < 0 or size > 1024 via nodetool, JMX, or code.
Common situations: 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.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- Cannot set concurrent_validations greater than…
- Not updating range_tombstone_resize_factor as growth factor…
- Number of concurrent compactors should be greater than 0.
- Number of concurrent index builders should be greater than…
- Number of concurrent view builders should be greater than 0.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/fd211c2fb94e5433.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/service/StorageService.java:5009
}
catch (ConfigurationException e)
{
throw new IllegalArgumentException(e.getMessage());
}
logger.info("Updated batch_size_warn_threshold to {}", thresholdInKiB);
}
public int getInitialRangeTombstoneListAllocationSize()
{
return DatabaseDescriptor.getInitialRangeTombstoneListAllocationSize();
}
public void setInitialRangeTombstoneListAllocationSize(int size)
{
if (size < 0 || size > 1024)
{
throw new IllegalStateException("Not updating initial_range_tombstone_allocation_size as it must be in the range [0, 1024] inclusive");
}
int originalSize = DatabaseDescriptor.getInitialRangeTombstoneListAllocationSize();
DatabaseDescriptor.setInitialRangeTombstoneListAllocationSize(size);
logger.info("Updated initial_range_tombstone_allocation_size from {} to {}", originalSize, size);
}
public double getRangeTombstoneResizeListGrowthFactor()
{
return DatabaseDescriptor.getRangeTombstoneListGrowthFactor();
}
public void setRangeTombstoneListResizeGrowthFactor(double growthFactor) throws IllegalStateException
{
if (growthFactor < 1.2 || growthFactor > 5)
{
throw new IllegalStateException("Not updating range_tombstone_resize_factor as growth factor must be in the range [1.2, 5.0] inclusive");
}
elseView on GitHub (pinned to 88fd0f6a0e)