[
https://issues.apache.org/jira/browse/CASSANDRA-4967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14905876#comment-14905876
]
John Sumsion commented on CASSANDRA-4967:
-----------------------------------------
I am part-way down revamping the validation / defaults logic for config. See
this branch on github:
- https://github.com/jdsumsion/cassandra/tree/4967-config-validation
If I'm going the wrong direction, please let me know soon, as I want to wrap
this up by the end of the summit.
> 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)