[ 
https://issues.apache.org/jira/browse/CASSANDRA-19583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842048#comment-17842048
 ] 

Ekaterina Dimitrova edited comment on CASSANDRA-19583 at 4/29/24 3:53 PM:
--------------------------------------------------------------------------

{quote}0 can mean "unlimited", but "0MiB/s" indicates actually zero.
{quote}
This confused me.
{quote}To be clear, I'm suggesting we make "0" work, without a unit. I'm not 
suggesting we change how 0MiB/s works. They can be equivalent. 
{quote}
Thanks for clarifying.

Then let's change this ticket to improvement and change its description to  
"enable 0 to work as 0+unit for all three config classes (DataStorageSpec, 
DurationSpec, DataRateSpec)" and not particularly for the compaction throughput 
config?


was (Author: e.dimitrova):
{quote}0 can mean "unlimited", but "0MiB/s" indicates actually zero.
{quote}
This confused me.
{quote}
To be clear, I'm suggesting we make "0" work, without a unit. I'm not 
suggesting we change how 0MiB/s works. They can be equivalent. 
{quote}
Thanks for clarifying.

Then let's change this ticket to improvement and change its description to  
"enable 0 to work as 0+unit for all three cofig classes (DataStorageSpec, 
DurationSpec, DataRateSpec)" and not particularly for the compaction throughput 
config?

> setting compaction throughput to 0 throws a startup error
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-19583
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19583
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local/Config
>            Reporter: Jon Haddad
>            Priority: Normal
>             Fix For: 4.1.x, 5.0.x, 5.x
>
>
> The inline docs say:
> {noformat}
> Setting this to 0 disables throttling.
> {noformat}
> However, on startup, we throw this error:
> {noformat}
> Caused by: java.lang.IllegalArgumentException: Invalid data rate: 0 Accepted 
> units: MiB/s, KiB/s, B/s where case matters and only non-negative values a>
> Apr 23 23:12:01 cassandra0 cassandra[3424]:         at 
> org.apache.cassandra.config.DataRateSpec.<init>(DataRateSpec.java:52)
> Apr 23 23:12:01 cassandra0 cassandra[3424]:         at 
> org.apache.cassandra.config.DataRateSpec.<init>(DataRateSpec.java:61)
> Apr 23 23:12:01 cassandra0 cassandra[3424]:         at 
> org.apache.cassandra.config.DataRateSpec$LongBytesPerSecondBound.<init>(DataRateSpec.java:232)
> Apr 23 23:12:01 cassandra0 cassandra[3424]:         ... 27 common frames 
> omitted
> {noformat}
> We should allow 0 as per the inline doc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to