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

Andy Tolbert updated CASSANDRA-15032:
-------------------------------------
    Description: 
To specify the number of transient replicas, replication options are specified 
like:

{code}
ALTER KEYSPACE foo WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 
'DC1' : '3/1'}; 
ALTER KEYSPACE foo WITH REPLICATION = {'class' : 'SimpleStrategy', 
'replication_factor' : '3/1'}
{code}

It occurred to me that existing client drivers that parse keyspace options may 
not handle this gracefully.

For example, the datastax java driver tries to parse {{3/1}} as a number and 
fails.  In this case, the parsing error is not fatal, its just that the 
metadata for that keyspace in the driver is incomplete, and things like token 
aware routing can't be utilized.

It is possible that other libraries may not handle this as well.

As an alternative, I propose adding a separate option like: 
{{'transient_replicas': 1}}.  {{replication_factor}} would represent the total 
number of replicas (full and transient) in this case. Something similar could 
be done for the NTS case, but might be slightly clumsy to express.

This would allow existing client libraries to continue working, and while 
things like routing may be suboptimal (i.e. driver won't know to differentiate 
between replicas and transient replicas), at least parsing won't fail in 
possibly fatal ways.



  was:
To specify the number of transient replicas, replication options are specified 
like:

{code}
ALTER KEYSPACE foo WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 
'DC1' : '3/1'}; ALTER KEYSPACE foo WITH REPLICATION = {'class' : 
'SimpleStrategy', 'replication_factor' : '3/1'}
{code}

It occurred to me that existing client drivers that parse keyspace options may 
not handle this gracefully.

For example, the datastax java driver tries to parse {{3/1}} as a number and 
fails.  In this case, the parsing error is not fatal, its just that the 
metadata for that keyspace in the driver is incomplete, and things like token 
aware routing can't be utilized.

It is possible that other libraries may not handle this as well.

As an alternative, I propose adding a separate option like: 
{{'transient_replicas': 1}}.  {{replication_factor}} would represent the total 
number of replicas (full and transient) in this case.

This would allow existing client libraries to continue working, and while 
things like routing may be suboptimal (i.e. driver won't know to differentiate 
between replicas and transient replicas), at least parsing won't fail in 
possibly fatal ways.




> Adjust transient replication keyspace replication options to be more friendly 
> to naive clients
> ----------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15032
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15032
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Feature/Transient Replication
>            Reporter: Andy Tolbert
>            Priority: Major
>
> To specify the number of transient replicas, replication options are 
> specified like:
> {code}
> ALTER KEYSPACE foo WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 
> 'DC1' : '3/1'}; 
> ALTER KEYSPACE foo WITH REPLICATION = {'class' : 'SimpleStrategy', 
> 'replication_factor' : '3/1'}
> {code}
> It occurred to me that existing client drivers that parse keyspace options 
> may not handle this gracefully.
> For example, the datastax java driver tries to parse {{3/1}} as a number and 
> fails.  In this case, the parsing error is not fatal, its just that the 
> metadata for that keyspace in the driver is incomplete, and things like token 
> aware routing can't be utilized.
> It is possible that other libraries may not handle this as well.
> As an alternative, I propose adding a separate option like: 
> {{'transient_replicas': 1}}.  {{replication_factor}} would represent the 
> total number of replicas (full and transient) in this case. Something similar 
> could be done for the NTS case, but might be slightly clumsy to express.
> This would allow existing client libraries to continue working, and while 
> things like routing may be suboptimal (i.e. driver won't know to 
> differentiate between replicas and transient replicas), at least parsing 
> won't fail in possibly fatal ways.



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

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

Reply via email to