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

Jon Hermes edited comment on CASSANDRA-1527 at 9/22/10 6:41 PM:
----------------------------------------------------------------

Because there are now too many ways to invalidate a metadata, I'm going to 
enumerate them.

1) Creation:
- First and foremost, catching these boundaries on the constructor fixes the 
case where the config is invalid. The config is read and 
DD.readTablesFromYaml() creates a CFMD for each CF.
- This also catches 'schematool import', which hits SS.loadSchemasFromYaml() 
which hits DD.readTablesFromYaml() in the same way.
- This also catches creation of an avro CfDef and loading it (generally, this 
is because we serialized it incorrectly). Calling CFMD.inflate(avro cfdef) will 
hit the constructor as well.

2) Modification:
- Throwing a runtime exception on the JMX CFS.setMin/MaxCompactionThreshold() 
methods will suffice to stop this invalidation point. This could be done a bit 
more kindly.
- Catching these boundaries on CFMD.apply(avro/thrift def) limits the case 
where someone makes a def and then pushes it in. This is ALSO caught by the 
constructor.

Now, bad things. A constructor throwing a ConfigurationException is not the 
nicest thing in the world. These would be internal errors, as thrift/avro 
aren't always involved.

      was (Author: jhermes):
    Because there are now too many ways to invalidate a metadata, I'm going to 
enumerate them.

1) Creation:
- First and foremost, catching these boundaries on the constructor fixes the 
case where the config is invalid. The config is read and 
DD.readTablesFromYaml() creates a CFMD for each CF.
- This also catches 'schematool import', which hits SS.loadSchemasFromYaml() 
which hits DD.readTablesFromYaml() in the same way.
- This also catches creation of an avro CfDef and loading it (generally, this 
is because we serialized it incorrectly). Calling CFMD.inflate(avro cfdef) will 
hit the constructor as well.

2) Modification:
- Throwing a runtime exception on the JMX CFS.setMin/MaxCompactionThreshold() 
methods will suffice to stop this invalidation point. This could be done a bit 
more kindly.
- Catching these boundaries on CFMD.apply(avro/thrift def) limits the case 
where someone makes a def and then pushes it in.
  
> ensure compaction thresholds are sane
> -------------------------------------
>
>                 Key: CASSANDRA-1527
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1527
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.7 beta 2
>            Reporter: Jonathan Ellis
>            Assignee: Jon Hermes
>            Priority: Minor
>             Fix For: 0.7.0
>
>
> make sure min <= max and neither is negative.
> also make sure that min=max=0 works (this is "no compaction")

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to