cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andres de la Peña (Jira) <>
Subject [jira] [Commented] (CASSANDRA-16959) nodetool setstreamthroughput accepts invalid arguments that are not immediately applied
Date Wed, 15 Sep 2021 14:52:00 GMT


Andres de la Peña commented on CASSANDRA-16959:

The proposed patch immediately applies the rate and considers negative values as unlimited:

I've opted for accepting negative values for simplicity, just to not repeat the validation
for the value in the configuration and in the two nodetool commands. We can easily reject
negative values if we prefer so.

Also I wonder whether we should improve [the log message|]
to include things like the unit of measurement, the previous rate or if the value is considered
unlimited. My only concern about this is compatibility, in case some tooling out there depends
on these log messages.

All praise to Niteshwar Kumar, who originally wrote the patch. The tiny tests for {{nodetool
setstreamthroughput/setinterdcstreamthroughput}} are mine.

> nodetool setstreamthroughput accepts invalid arguments that are not immediately applied
> ---------------------------------------------------------------------------------------
>                 Key: CASSANDRA-16959
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tool/nodetool
>            Reporter: Andres de la Peña
>            Assignee: Andres de la Peña
>            Priority: Normal
> Both {{nodetool setstreamthroughput}} and {{nodetool setinterdcstreamthroughput}} accept
a negative throughput. The throughput value is not immediately applied to the corresponding
rate limiters. Instead, the value is [set in the {{Config}}|]
and it's only applied to the singleton rate limiter when new sstable stream writer are created
(see [here|]).
This could happen much later than the definition of the new throughput, and by then the setting
of the new rate in the rate limiter will fail with an {{IllegalArgumentException}} due to
the negative value.
> I think we should either immediately reject negative throughputs or consider them unlimited,
as we do with zero. Also we should probably apply the new throughput to the rate limiter immediately,
since I don't see why we should wait to start using the new throughput.

This message was sent by Atlassian Jira

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message