cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-4734) Move CQL3 consistency to protocol
Date Tue, 02 Oct 2012 14:51:10 GMT


Sylvain Lebresne commented on CASSANDRA-4734:

bq. does that mean we should also remove set_cql_version

There's still prepare_cql_query that is shared by both versions and uses the version set by
set_cql_version. But I would agree that it's probably worth duplicating that one too and removing

bq. ave we already changed CQL3 enough that it's not worth the trouble?

Well, prior to this patch, the main syntax break was in CREATE statements (the change to the
map syntax). But this patch probably break way more code as any non-trivial code will have
code to adapt. That being said, backporting would still probably help, the main problem being
that I'm not sure how to properly support both the new and old methods (i.e. the QueryProcessor
in 1.1 would have to support both the consistency in the language and in the protocol, which
seems messy).
> Move CQL3 consistency to protocol
> ---------------------------------
>                 Key: CASSANDRA-4734
>                 URL:
>             Project: Cassandra
>          Issue Type: Task
>          Components: API
>            Reporter: Jonathan Ellis
>            Assignee: Sylvain Lebresne
>             Fix For: 1.2.0 beta 2
>         Attachments: 0001-Move-consistency-level-to-the-protocol-level.txt, 0002-Remove-remains-of-4448.txt
> Currently, in CQL3, you set the consistency level of an operation in
> the language, eg 'SELECT * FROM foo USING CONSISTENCY QUORUM'.  It now
> looks like this was a mistake, and that consistency should be set at
> the protocol level, i.e. as a separate parameter along with the query.
> The reasoning is that the CL applies to the guarantee provided by the
> operation being successful, not to the query itself.  Specifically,
> having the CL being part of the language means that CL is opaque to
> low level client libraries without themselves parsing the CQL, which
> we want to avoid.  Thus,
> - Those libraries can't implement automatic retries policy, where a query would be retried
with a smaller CL.  (I'm aware that this is often a Bad Idea, but it does have legitimate
uses and not having that available is seen as a regression from the Thrift api.)
> - We had to introduce CASSANDRA-4448 to allow the client to configure some  form of default
CL since the library can't handle that anymore, which is  hackish.
> - Executing prepared statements with different CL requires preparing multiple statements.
> - CL only makes sense for BATCH operations as a whole, not the sub-statements within
the batch. Currently CQL3 "fixes" that by validating the given CLs match, but it would be
much more clear if the CL was on the protocol side.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message