Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-16959

nodetool setstreamthroughput accepts invalid arguments that are not immediately applied

    XMLWordPrintableJSON

Details

    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

          Activity

            People

              adelapena Andres de la Peña
              adelapena Andres de la Peña
              Andres de la Peña
              Aleksei Zotov, Berenguer Blasi, Brandon Williams
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m