Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
3.0.26, 3.11.12, 4.0.2, 4.1-alpha1, 4.1
-
None
-
Code
-
Normal
-
Normal
-
Code Inspection
-
All
-
None
-
Description
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.
Attachments
Issue Links
- links to