Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-15032

Adjust transient replication keyspace replication options to be more friendly to naive clients

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • None
    • None

    Description

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

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

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            andrew.tolbert Andy Tolbert
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: