apache/cassandra · error · IllegalArgumentException
Invalid parameter list for sequence distribution…
Error message
Invalid parameter list for sequence distribution (min==max):
What it means
The sequence distribution additionally rejects degenerate ranges where min equals max, since a sequence between two identical values is meaningless (it is what the fixed distribution is for). This exact IllegalArgumentException is thrown for such specs.
Solutions
- Use FIX(value) when you want a constant population/value
- Give min and max distinct values: SEQ(1..1000)
- Add a bounds check in scripts generating the spec: throw if min >= max.
Example fix
// before -pop seq=SEQ(1000..1000) // after -pop seq=FIX(1000)
Defensive patterns
Strategy: validation
Validate before calling
boolean isDegenerate(long min, long max){ return min == max; } // require min < max for SEQ Try / catch
try { DistributionFactory f = seq.getFactory(params); } catch (IllegalArgumentException e) { return OptionDistribution.get("FIX(" + min + ")"); } Prevention
- When generating bounds programmatically, assert min < max
- Map single-value cases to FIX(...) instead of SEQ(v..v)
- Unit-test spec generators for degenerate inputs
When it happens
Trigger: Calling getFactory for the sequence impl where parsed min and max are equal, e.g. SEQ(1000..1000).
Common situations: Programmatically generated ranges whose bounds collapse to one value (e.g. both computed from the same variable); copy/paste of the same number for both bounds.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Invalid parameter list for sequence distribution (min>max):
- arguments for -F are json, yaml, table only.
- Cannot specify tokens without keyspace.
- Invalid parameter list for fixed distribution:
- Invalid parameter list for sequence distribution:
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/07754204ca497315.
Report an issue: GitHub.
Appendix: source
Thrown at tools/stress/src/org/apache/cassandra/stress/settings/OptionDistribution.java:390
@Override
public DistributionFactory getFactory(List<String> params)
{
if (params.size() != 1)
throw new IllegalArgumentException("Invalid parameter list for sequence distribution: " + params);
final long min;
final long max;
try
{
String[] bounds = params.get(0).split("\\.\\.+");
min = parseLong(bounds[0]);
max = parseLong(bounds[1]);
} catch (Exception ignore)
{
throw new IllegalArgumentException("Invalid parameter list for sequence distribution: " + params);
}
if (min == max)
throw new IllegalArgumentException("Invalid parameter list for sequence distribution (min==max): " + params);
if (min > max)
throw new IllegalArgumentException("Invalid parameter list for sequence distribution (min>max): " + params);
return new SequenceFactory(min, max);
}
}
private static final class InverseFactory implements DistributionFactory
{
final DistributionFactory wrapped;
private InverseFactory(DistributionFactory wrapped)
{
this.wrapped = wrapped;
}
View on GitHub (pinned to 88fd0f6a0e)