Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4045A91C1 for ; Tue, 2 Oct 2012 15:55:08 +0000 (UTC) Received: (qmail 31368 invoked by uid 500); 2 Oct 2012 15:55:08 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 31331 invoked by uid 500); 2 Oct 2012 15:55:08 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 31321 invoked by uid 99); 2 Oct 2012 15:55:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Oct 2012 15:55:08 +0000 Date: Wed, 3 Oct 2012 02:55:07 +1100 (NCT) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Message-ID: <1697487351.154762.1349193308045.JavaMail.jiratomcat@arcas> In-Reply-To: <1912374566.140702.1348861267947.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (CASSANDRA-4734) Move CQL3 consistency to protocol MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-4734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467811#comment-13467811 ] Jonathan Ellis commented on CASSANDRA-4734: ------------------------------------------- bq. it's probably worth duplicating that one too and removing set_cql_version +1 bq. I'm not sure how to properly support both the new and old methods Ugh. Guess we can take a YAGNI approach -- we've been pretty clear that cql3 might change from 1.1 to 1.2, but we can always backport to 1.1.x later if someone needs it badly enough. > Move CQL3 consistency to protocol > --------------------------------- > > Key: CASSANDRA-4734 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4734 > 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: http://www.atlassian.com/software/jira