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

Caleb Rackliffe commented on CASSANDRA-17725:
---------------------------------------------

bq. maybe we can use the  NEGATIVE_SECONDS_DURATION converter from the 
Converters class we added for validation_preview_purge_head_start which will 
convert a negative number to 0 in 4.1 and tell people from now on will use 0 to 
disable but at the same time if they upgrade with negative and the old value 
format and property name, they will be able to set negative number which will 
be migrated internally to 0. I am really not completely sure, what do others 
think?

The sequence in the code is...

{noformat}
long start = nanoTime();
...
long loadByNanos = start + 
TimeUnit.SECONDS.toNanos(DatabaseDescriptor.getCacheLoadTimeout());
while (nanoTime() < loadByNanos && in.available() > 0)
{
// do saved cache loading stuff
{noformat}

So unless the high-resolution clock goes backwards, -1 and 0 should have the 
same effect. (i.e. {{start == loadByNanos}} and getting {{nanoTime()}} again 
should be >= {{start}}) The condition of the {{while}} loop, if interpreted 
strictly as "don't try any more saved cache loading if we've hit the load-by 
time", is fine, and I think the only concern we have is making sure an 
inherited -1 from an old config doesn't make things explode. (There was never 
any explicit checking for -1 in the original patch that I can see.)

> Add a flag for throughput in MiB/s for nodetool setstreamthroughput, 
> getstreamthroughput, setinterdcstreamthroughput and 
> getinterdcstreamthroughput 
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-17725
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17725
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tool/nodetool
>            Reporter: Ekaterina Dimitrova
>            Assignee: Ekaterina Dimitrova
>            Priority: Normal
>             Fix For: 4.1-beta, 4.x
>
>
> As we agreed not to add new JMX methods for the new config on the mailing 
> list, we need at least new flags for setstreamthroughput and 
> interdcstreamthroughput for the two 4.0 parameters to be set/get also in MiB, 
> not only in megabits.
> Thus we will have the option either to use the old version for those 2, or to 
> be able to set/get in MiB all 4 streaming parameters. As of 4.1 supported 
> units for DataRateSpec are MiB/s, B/s, KiB/s, megabit is only for legacy from 
> 4.0 - backward compatibility. 
> To be sure we satisfy the requirements around the latest discussions about 
> backward compatibility in tools, I will use this ticket also to make a final 
> pass on the unit changes done, to ensure the probe output is not affected.



--
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