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

John Sumsion commented on CASSANDRA-4967:
-----------------------------------------

I got part way through applying the validation checks before I left.  Hopefully 
I can wrap it up.  I didn't get any feedback on the approach, so I'm just 
continuing.

This branch is rebased on top of the latest trunk as of now:
- https://github.com/jdsumsion/cassandra/tree/4967-config-validation

> 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: Core
>    Affects Versions: 1.2.0 beta 2
>            Reporter: Robert Coli
>            Priority: Minor
>              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
(v6.3.4#6332)

Reply via email to