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

Andres de la Peña commented on CASSANDRA-17571:
-----------------------------------------------

[~e.dimitrova] I see that the conversion methods in {{DataStorageSpec}} [are 
still 
present|https://github.com/ekaterinadimitrova2/cassandra/blob/f2d56d54bf62f18e8daea7736639119c3fe1b89a/src/java/org/apache/cassandra/config/DataStorageSpec.java#L137-L189],
 and the leaf classes override them.

Also, if we are going to move the conversion methods to the leaf classes, we 
can probably get rid of the {{to*AsInt}} methods, and instead have, for example:
 * A {{DataStorageSpec.LongMebibytesBound#toMebibytes}} that returns {{long}}
 * A {{DataStorageSpec.IntMebibytesBound#toMebibytes}} that returns {{{}int{}}}.

That would be possible because we don't have a common inherited 
{{DataStorageSpec#toMebibytes}} anymore. I gave it a quick try in [this 
commit|https://github.com/adelapena/cassandra/commit/a7485d88a434dc321a60a006d4f36b294a139d49],
 which is just a sketch to show how it would look like.

> Config upper bound should be handled earlier
> --------------------------------------------
>
>                 Key: CASSANDRA-17571
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17571
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local/Config
>            Reporter: Ekaterina Dimitrova
>            Assignee: Ekaterina Dimitrova
>            Priority: Normal
>             Fix For: 4.1-beta, 4.x
>
>
> Config upper bound should be handled on startup/config setup and not during 
> conversion



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to