cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Hermes (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (CASSANDRA-1263) Push replication factor down to the replication strategy
Date Wed, 20 Oct 2010 19:36:26 GMT

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

Jon Hermes edited comment on CASSANDRA-1263 at 10/20/10 3:36 PM:
-----------------------------------------------------------------

So on keyspace instantiation, I expect some set of opts for a given strategy to exist, otherwise
calling getRF() will explode. Because user-def strats can require arbitrary opts, I can't
easily verify that they exist*, and I can't guarantee that system_create_keyspace() will not
explode (which is a non-desired side effect). 

Furthermore, I have to call getRF() in every place in the code that we ask for the instance
RF, and I can't guarantee that getRF() is non-trivial (and it runs in tight loops). -Caching
the getRF() call is a hefty chunk of code, and then I need to reset the cached value if the
KSMD changes during runtime, which is another hefty chunk of code.- < This can be done
in the current place of replication_factor, so it's not painful.

*It is possible to make every strat implement an interface method for `List<String>
returnRequiredOpts()`.

      was (Author: jhermes):
    So on keyspace instantiation, I expect some set of opts for a given strategy to exist,
otherwise calling getRF() will explode. Because user-def strats can require arbitrary opts,
I can't easily verify that they exist*, and I can't guarantee that system_create_keyspace()
will not explode (which is a non-desired side effect). 

Furthermore, I have to call getRF() in every place in the code that we ask for the instance
RF, and I can't guarantee that getRF() is non-trivial (and it runs in tight loops). Caching
the getRF() call is a hefty chunk of code, and then I need to reset the cached value if the
KSMD changes during runtime, which is another hefty chunk of code.

*It is possible to make every strat implement an interface method for `List<String>
returnRequiredOpts()`.
  
> Push replication factor down to the replication strategy
> --------------------------------------------------------
>
>                 Key: CASSANDRA-1263
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1263
>             Project: Cassandra
>          Issue Type: Task
>          Components: Core
>            Reporter: Jeremy Hanna
>            Assignee: Jon Hermes
>            Priority: Minor
>             Fix For: 0.7.0
>
>
> Currently the replication factor is in the keyspace metadata.  As we've added the datacenter
shard strategy, the replication factor becomes more computed by the replication strategy.
 It seems reasonable to therefore push the replication factor for the keyspace down to the
replication strategy so that it can be handled in one place.
> This adds on the work being done in CASSANDRA-1066 since that ticket will make the replication
strategy a member variable of keyspace metadata instead of just a quasi singleton giving the
replication strategy state for each keyspace.  That makes it able to have the replication
factor.

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


Mime
View raw message