apache/cassandra · error · IllegalArgumentException
=' ' cannot be greater than =' ' for
Error message
%s='%s' cannot be greater than %s='%s' for %s
What it means
RepairTokenRangeSplitter.reinitParameters validates that bytes_per_assignment <= max_bytes_per_schedule for the given repair type and throws IllegalArgumentException when bytesPerAssignment exceeds maxBytesPerSchedule. This prevents scheduling assignments larger than the per-schedule bytes budget.
Solutions
- Lower bytes_per_assignment so it is <= max_bytes_per_schedule
- Raise max_bytes_per_schedule to at least bytes_per_assignment
- Use consistent units in both values and re-apply the config
Example fix
# before bytes_per_assignment: 10GB max_bytes_per_schedule: 5GB # after bytes_per_assignment: 1GB max_bytes_per_schedule: 5GB
Defensive patterns
Strategy: validation
Validate before calling
DataStorageSpec.LongBytesBound assign = parse(bytesPerAssignment);
DataStorageSpec.LongBytesBound max = parse(maxBytesPerSchedule);
if (assign.toBytes() > max.toBytes())
throw new IllegalArgumentException("bytes_per_assignment must be <= max_bytes_per_schedule"); Try / catch
try { splitter.setParameter(key, value); }
catch (IllegalArgumentException e) {
if (e.getMessage().contains("cannot be greater than"))
logger.warn("Auto-repair byte bounds invalid; fix config and retry", e);
else throw e;
} Prevention
- Set both bytes bounds together and assert assign <= max
- Double-check units (MiB/MB, GiB/GB) in cassandra.yaml values
- Run getautorepairconfig after updates to confirm applied values
When it happens
Trigger: Setting auto-repair config where BYTES_PER_ASSIGNMENT is greater than MAX_BYTES_PER_SCHEDULE — triggered at init (constructor calls reinitParameters) or via setParameter dynamic update.
Common situations: Config edits in cassandra.yaml with mismatched byte bounds (e.g. 10GB assignment vs 5GB schedule); dynamic updates via nodetool setautorepairconfig; unit mistakes (MB vs GB) in DataStorageSpec values.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Cannot mix auto and manual DC weights
- Cannot set concurrent_validations greater than…
- Cannot set repair_session_max_tree_depth to which is < 10…
- Cannot set source data center to be local data center, when…
- Commit log flush interval must be positive: %fms
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/906c85a41a8480ba.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/repair/autorepair/RepairTokenRangeSplitter.java:185
public RepairTokenRangeSplitter(AutoRepairConfig.RepairType repairType, Map<String, String> parameters)
{
this.repairType = repairType;
this.givenParameters.putAll(parameters);
reinitParameters();
}
private void reinitParameters()
{
RepairTypeDefaults defaults = DEFAULTS_BY_REPAIR_TYPE.get(repairType);
DataStorageSpec.LongBytesBound bytesPerAssignmentTmp = getPropertyOrDefault(BYTES_PER_ASSIGNMENT, DataStorageSpec.LongBytesBound::new, defaults.bytesPerAssignment);
DataStorageSpec.LongBytesBound maxBytesPerScheduleTmp = getPropertyOrDefault(MAX_BYTES_PER_SCHEDULE, DataStorageSpec.LongBytesBound::new, defaults.maxBytesPerSchedule);
// Validate that bytesPerAssignment <= maxBytesPerSchedule
if (bytesPerAssignmentTmp.toBytes() > maxBytesPerScheduleTmp.toBytes())
{
throw new IllegalArgumentException(String.format("%s='%s' cannot be greater than %s='%s' for %s",
BYTES_PER_ASSIGNMENT,
bytesPerAssignmentTmp,
MAX_BYTES_PER_SCHEDULE,
maxBytesPerScheduleTmp,
repairType.getConfigName()));
}
bytesPerAssignment = bytesPerAssignmentTmp;
maxBytesPerSchedule = maxBytesPerScheduleTmp;
partitionsPerAssignment = getPropertyOrDefault(PARTITIONS_PER_ASSIGNMENT, Long::parseLong, defaults.partitionsPerAssignment);
maxTablesPerAssignment = getPropertyOrDefault(MAX_TABLES_PER_ASSIGNMENT, Integer::parseInt, defaults.maxTablesPerAssignment);
logger.info("Configured {}[{}] with {}={}, {}={}, {}={}, {}={}", RepairTokenRangeSplitter.class.getName(),
repairType.getConfigName(),
BYTES_PER_ASSIGNMENT, bytesPerAssignment,
PARTITIONS_PER_ASSIGNMENT, partitionsPerAssignment,
MAX_TABLES_PER_ASSIGNMENT, maxTablesPerAssignment,View on GitHub (pinned to 88fd0f6a0e)