apache/cassandra · error · IllegalArgumentException

entire_sstable_inter_dc_stream_throughput_outbound: is too l

Error message

entire_sstable_inter_dc_stream_throughput_outbound: is too large; it should be less than 2147483647 in MiB/s

What it means

setEntireSSTableInterDCStreamThroughputOutboundMebibytesPerSec rejects exactly Integer.MAX_VALUE, which is reserved as an internal sentinel in the DataRateSpec bound. Storing it would break subsequent unit conversions, so it is refused with IllegalArgumentException.

Source

Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:3271

    public static void setInterDCStreamThroughputOutboundMegabitsPerSec(int value)
    {
        conf.inter_dc_stream_throughput_outbound = DataRateSpec.LongBytesPerSecondBound.megabitsPerSecondInBytesPerSecond(value);
    }

    public static double getEntireSSTableInterDCStreamThroughputOutboundBytesPerSec()
    {
        return conf.entire_sstable_inter_dc_stream_throughput_outbound.toBytesPerSecond();
    }

    public static double getEntireSSTableInterDCStreamThroughputOutboundMebibytesPerSec()
    {
        return conf.entire_sstable_inter_dc_stream_throughput_outbound.toMebibytesPerSecond();
    }

    public static void setEntireSSTableInterDCStreamThroughputOutboundMebibytesPerSec(int value)
    {
        if (value == Integer.MAX_VALUE)
            throw new IllegalArgumentException("entire_sstable_inter_dc_stream_throughput_outbound: " + value +
                                               " is too large; it should be less than " +
                                               Integer.MAX_VALUE + " in MiB/s");

        conf.entire_sstable_inter_dc_stream_throughput_outbound = new DataRateSpec.LongBytesPerSecondBound(value, MEBIBYTES_PER_SECOND);
    }

    /**
     * Checks if the local system data must be stored in a specific location which supports redundancy.
     *
     * @return {@code true} if the local system keyspaces data must be stored in a different location,
     * {@code false} otherwise.
     */
    public static boolean useSpecificLocationForLocalSystemData()
    {
        return conf.local_system_data_file_directory != null;
    }

    /**

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Pass a concrete MiB/s rate below Integer.MAX_VALUE.
  2. Use Cassandra's documented way to disable throttling rather than a sentinel.
  3. Guard the call site against the exact sentinel value.

Example fix

// before
DatabaseDescriptor.setEntireSSTableInterDCStreamThroughputOutboundMebibytesPerSec(Integer.MAX_VALUE);
// after
DatabaseDescriptor.setEntireSSTableInterDCStreamThroughputOutboundMebibytesPerSec(100);
Defensive patterns

Strategy: validation

Validate before calling

if (value != Integer.MAX_VALUE) DatabaseDescriptor.setEntireSSTableInterDCStreamThroughputOutboundMebibytesPerSec(value); else throw new IllegalArgumentException("Integer.MAX_VALUE is reserved");

Type guard

boolean isValidEntireSSTableInterDCMib(int v) { return v != Integer.MAX_VALUE; }

Try / catch

try { DatabaseDescriptor.setEntireSSTableInterDCStreamThroughputOutboundMebibytesPerSec(v); } catch (IllegalArgumentException e) { log.error("Rejected entire_sstable inter-DC throughput sentinel", e); }

Prevention

When it happens

Trigger: Calling DatabaseDescriptor.setEntireSSTableInterDCStreamThroughputOutboundMebibytesPerSec(Integer.MAX_VALUE), e.g. via JMX/nodetool with a max-int 'unlimited' value.

Common situations: Operators trying to remove inter-DC entire-SSTable throttling with a sentinel; tools defaulting missing settings to Integer.MAX_VALUE; test code using max-int placeholders.

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


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/0d9e897fa1d4a303. Report an issue: GitHub.