You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jeremy Hanna (JIRA)" <ji...@apache.org> on 2019/06/13 18:29:10 UTC

[jira] [Updated] (CASSANDRA-4967) config options have different bounds when set via different methods

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

Jeremy Hanna updated CASSANDRA-4967:
------------------------------------
    Complexity: Low Hanging Fruit

> config options have different bounds when set via different methods
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-4967
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4967
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local/Config
>    Affects Versions: 1.2.0 beta 2
>            Reporter: Robert Coli
>            Priority: Low
>              Labels: lhf
>
> (similar to some of the work done in https://issues.apache.org/jira/browse/CASSANDRA-4479
> )
> If one sets a value in cassandra.yaml, that value might be subject to bounds checking there. However if one sets that same value via JMX, it doesn't get set via a bounds-checking code path.
> "./src/java/org/apache/cassandra/config/DatabaseDescriptor.java" (JMX set)
> {noformat}
>     public static void setPhiConvictThreshold(double phiConvictThreshold)
>     {
>         conf.phi_convict_threshold = phiConvictThreshold;
>     }
> {noformat}
> Versus..
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java (cassandra.yaml)
> {noformat}
>     static void loadYaml()
> ...
>       /* phi convict threshold for FailureDetector */
>             if (conf.phi_convict_threshold < 5 || conf.phi_convict_threshold > 16)
>             {
>                 throw new ConfigurationException("phi_convict_threshold must be between 5 and 16");
>             }
> {noformat}
> This seems to create a confusing situation where the range of potential values for a given configuration option is different when set by different methods. 
> It's difficult to imagine a circumstance where you want bounds checking to keep your node from starting if you set that value in cassandra.yaml, but also want to allow circumvention of that bounds checking if you set via JMX.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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