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

Sylvain Lebresne updated CASSANDRA-4448:
----------------------------------------

    Attachment: 4448.txt

Attaching patch (against trunk).

One slight difficulty is BATCH statements, where all statements are executed 
with the same CL, so it is unclear what to pick as a default consistency level 
for the batch unless all statement have the same default write CL.

The patch takes the approach of simply refusing the batch unless either 1) the 
batch explicitly sets a CL or 2) all the statements of the batch have the same 
CL. I believe this to be a reasonable behavior, that won't limit in any way the 
APIs that sets the CL for you, or even people that never use those new settings.

I'll note that this problem of 'batch can only have one CL' is not specific to 
those new options. I haven't checked how existing client library that allow to 
set a per-CF default CL deal with it.  
                
> CQL3: allow to define a per-cf default consistency level
> --------------------------------------------------------
>
>                 Key: CASSANDRA-4448
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4448
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Sylvain Lebresne
>              Labels: cql3
>             Fix For: 1.2
>
>         Attachments: 4448.txt
>
>
> One of the goal of CQL3 is that client library should not have to parse 
> queries to provide a good experience. In particular, that means such client 
> (that don't want to parse queries) won't be able to allow the user to define 
> a specific default read/write consistency level per-CF, forcing user to 
> specific the consistency level with every query, which is not very user 
> friendly.
> This ticket suggests the addition of per-cf default read/write consitency 
> level. Typically the syntax would be:
> {noformat}
> CREATE TABLE foo (...)
> WITH DEFAULT_READ_CONSISTENCY = QUORUM
>  AND DEFAULT_WRITE_CONSISTENCY = QUORUM
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to