[jira] [Updated] (CASSANDRA-16959) nodetool setstreamthroughput accepts invalid arguments that are not immediately applied

2021-10-01 Thread Jira


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andres de la Peña updated CASSANDRA-16959:
--
  Fix Version/s: (was: 4.0.x)
 (was: 3.11.x)
 (was: 4.x)
 (was: 3.0.x)
 4.1
 4.0.2
 3.11.12
 3.0.26
  Since Version: NA
Source Control Link: 
https://github.com/apache/cassandra/commit/4f8afe85bfb2633d98beed39e665463bf19b8789
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

> nodetool setstreamthroughput accepts invalid arguments that are not 
> immediately applied
> ---
>
> Key: CASSANDRA-16959
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16959
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/nodetool
>Reporter: Andres de la Peña
>Assignee: Andres de la Peña
>Priority: Normal
> Fix For: 3.0.26, 3.11.12, 4.0.2, 4.1
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> 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}}|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/service/StorageService.java#L1488]
>  and it's only applied to the singleton rate limiter when new sstable stream 
> writer are created (see 
> [here|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/streaming/StreamManager.java#L66-L76]).
>  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
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-16959) nodetool setstreamthroughput accepts invalid arguments that are not immediately applied

2021-10-01 Thread Jira


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andres de la Peña updated CASSANDRA-16959:
--
Status: Ready to Commit  (was: Review In Progress)

> nodetool setstreamthroughput accepts invalid arguments that are not 
> immediately applied
> ---
>
> Key: CASSANDRA-16959
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16959
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/nodetool
>Reporter: Andres de la Peña
>Assignee: Andres de la Peña
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> 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}}|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/service/StorageService.java#L1488]
>  and it's only applied to the singleton rate limiter when new sstable stream 
> writer are created (see 
> [here|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/streaming/StreamManager.java#L66-L76]).
>  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
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-16959) nodetool setstreamthroughput accepts invalid arguments that are not immediately applied

2021-09-29 Thread Ekaterina Dimitrova (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ekaterina Dimitrova updated CASSANDRA-16959:

Reviewers: Aleksei Zotov, Berenguer Blasi, Brandon Williams  (was: Aleksei 
Zotov, Berenguer Blasi, Brandon Williams, Ekaterina Dimitrova)

> nodetool setstreamthroughput accepts invalid arguments that are not 
> immediately applied
> ---
>
> Key: CASSANDRA-16959
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16959
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/nodetool
>Reporter: Andres de la Peña
>Assignee: Andres de la Peña
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> 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}}|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/service/StorageService.java#L1488]
>  and it's only applied to the singleton rate limiter when new sstable stream 
> writer are created (see 
> [here|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/streaming/StreamManager.java#L66-L76]).
>  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
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-16959) nodetool setstreamthroughput accepts invalid arguments that are not immediately applied

2021-09-23 Thread Ekaterina Dimitrova (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ekaterina Dimitrova updated CASSANDRA-16959:

Reviewers: Aleksei Zotov, Berenguer Blasi, Brandon Williams, Ekaterina 
Dimitrova  (was: Aleksei Zotov, Berenguer Blasi, Brandon Williams)
   Status: Review In Progress  (was: Patch Available)

> nodetool setstreamthroughput accepts invalid arguments that are not 
> immediately applied
> ---
>
> Key: CASSANDRA-16959
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16959
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/nodetool
>Reporter: Andres de la Peña
>Assignee: Andres de la Peña
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> 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}}|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/service/StorageService.java#L1488]
>  and it's only applied to the singleton rate limiter when new sstable stream 
> writer are created (see 
> [here|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/streaming/StreamManager.java#L66-L76]).
>  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
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-16959) nodetool setstreamthroughput accepts invalid arguments that are not immediately applied

2021-09-23 Thread Aleksei Zotov (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksei Zotov updated CASSANDRA-16959:
--
Reviewers: Aleksei Zotov, Berenguer Blasi, Brandon Williams  (was: 
Berenguer Blasi, Brandon Williams)

> nodetool setstreamthroughput accepts invalid arguments that are not 
> immediately applied
> ---
>
> Key: CASSANDRA-16959
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16959
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/nodetool
>Reporter: Andres de la Peña
>Assignee: Andres de la Peña
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> 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}}|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/service/StorageService.java#L1488]
>  and it's only applied to the singleton rate limiter when new sstable stream 
> writer are created (see 
> [here|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/streaming/StreamManager.java#L66-L76]).
>  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
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-16959) nodetool setstreamthroughput accepts invalid arguments that are not immediately applied

2021-09-23 Thread Berenguer Blasi (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Berenguer Blasi updated CASSANDRA-16959:

Reviewers: Berenguer Blasi, Brandon Williams  (was: Brandon Williams)

> nodetool setstreamthroughput accepts invalid arguments that are not 
> immediately applied
> ---
>
> Key: CASSANDRA-16959
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16959
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/nodetool
>Reporter: Andres de la Peña
>Assignee: Andres de la Peña
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 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}}|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/service/StorageService.java#L1488]
>  and it's only applied to the singleton rate limiter when new sstable stream 
> writer are created (see 
> [here|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/streaming/StreamManager.java#L66-L76]).
>  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
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-16959) nodetool setstreamthroughput accepts invalid arguments that are not immediately applied

2021-09-22 Thread Brandon Williams (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams updated CASSANDRA-16959:
-
Reviewers: Brandon Williams  (was: Berenguer Blasi)

> nodetool setstreamthroughput accepts invalid arguments that are not 
> immediately applied
> ---
>
> Key: CASSANDRA-16959
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16959
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/nodetool
>Reporter: Andres de la Peña
>Assignee: Andres de la Peña
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>
> 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}}|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/service/StorageService.java#L1488]
>  and it's only applied to the singleton rate limiter when new sstable stream 
> writer are created (see 
> [here|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/streaming/StreamManager.java#L66-L76]).
>  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
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-16959) nodetool setstreamthroughput accepts invalid arguments that are not immediately applied

2021-09-20 Thread Berenguer Blasi (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Berenguer Blasi updated CASSANDRA-16959:

Reviewers: Berenguer Blasi

> nodetool setstreamthroughput accepts invalid arguments that are not 
> immediately applied
> ---
>
> Key: CASSANDRA-16959
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16959
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/nodetool
>Reporter: Andres de la Peña
>Assignee: Andres de la Peña
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>
> 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}}|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/service/StorageService.java#L1488]
>  and it's only applied to the singleton rate limiter when new sstable stream 
> writer are created (see 
> [here|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/streaming/StreamManager.java#L66-L76]).
>  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
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-16959) nodetool setstreamthroughput accepts invalid arguments that are not immediately applied

2021-09-15 Thread Jira


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andres de la Peña updated CASSANDRA-16959:
--
 Bug Category: Parent values: Code(13163)
   Complexity: Normal
Discovered By: Code Inspection
Fix Version/s: 4.x
   4.0.x
   3.11.x
   3.0.x
 Severity: Normal
   Status: Open  (was: Triage Needed)

> nodetool setstreamthroughput accepts invalid arguments that are not 
> immediately applied
> ---
>
> Key: CASSANDRA-16959
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16959
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/nodetool
>Reporter: Andres de la Peña
>Assignee: Andres de la Peña
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>
> 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}}|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/service/StorageService.java#L1488]
>  and it's only applied to the singleton rate limiter when new sstable stream 
> writer are created (see 
> [here|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/streaming/StreamManager.java#L66-L76]).
>  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
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-16959) nodetool setstreamthroughput accepts invalid arguments that are not immediately applied

2021-09-15 Thread Jira


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andres de la Peña updated CASSANDRA-16959:
--
Test and Documentation Plan: Some unit tests are included.
 Status: Patch Available  (was: Open)

> nodetool setstreamthroughput accepts invalid arguments that are not 
> immediately applied
> ---
>
> Key: CASSANDRA-16959
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16959
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/nodetool
>Reporter: Andres de la Peña
>Assignee: Andres de la Peña
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>
> 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}}|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/service/StorageService.java#L1488]
>  and it's only applied to the singleton rate limiter when new sstable stream 
> writer are created (see 
> [here|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/streaming/StreamManager.java#L66-L76]).
>  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
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-16959) nodetool setstreamthroughput accepts invalid arguments that are not immediately applied

2021-09-15 Thread Jira


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-16959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andres de la Peña updated CASSANDRA-16959:
--
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}}|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/service/StorageService.java#L1488]
 and it's only applied to the singleton rate limiter when new sstable stream 
writer are created (see 
[here|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/streaming/StreamManager.java#L66-L76]).
 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.

  was:
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, which could happen much 
later. 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.


> nodetool setstreamthroughput accepts invalid arguments that are not 
> immediately applied
> ---
>
> Key: CASSANDRA-16959
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16959
> 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}}|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/service/StorageService.java#L1488]
>  and it's only applied to the singleton rate limiter when new sstable stream 
> writer are created (see 
> [here|https://github.com/apache/cassandra/blob/09c89e5f5f8604301c233130dfb6e82a36ae30f3/src/java/org/apache/cassandra/streaming/StreamManager.java#L66-L76]).
>  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
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org