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 69D031043F for ; Tue, 11 Feb 2014 18:26:43 +0000 (UTC) Received: (qmail 79929 invoked by uid 500); 11 Feb 2014 18:26:37 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 79690 invoked by uid 500); 11 Feb 2014 18:26:32 -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 79342 invoked by uid 99); 11 Feb 2014 18:26:26 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Feb 2014 18:26:25 +0000 Date: Tue, 11 Feb 2014 18:26:25 +0000 (UTC) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-6649) CQL: disallow counter update with "USING TIMESTAMP" and "USING TTL" 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-6649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13898104#comment-13898104 ] Sylvain Lebresne commented on CASSANDRA-6649: --------------------------------------------- For the 2.0 version, I really think we should have a longer, more explanatory message, since users will get that out of context in the log. Something like: "Detected use of 'USING TIMESTAMP' in counter UPDATE. This is invalid since counters do not use timestamps and the timestamp has been ignored. Such query will be rejected starting from Cassandra 2.1 so you should fix your query.". But lgtm otherwise. Note: I would also commit that in 1.2 too because really, that's just a warning and it's never too early to warn user that it's not doing what they probably think it does (if we end up not doing any more 1.2 release, there is still not harm having committed it). I'm not extremely strong on that though. > CQL: disallow counter update with "USING TIMESTAMP" and "USING TTL" > ------------------------------------------------------------------- > > Key: CASSANDRA-6649 > URL: https://issues.apache.org/jira/browse/CASSANDRA-6649 > Project: Cassandra > Issue Type: Bug > Reporter: Sylvain Lebresne > Assignee: Aleksey Yeschenko > Priority: Trivial > Fix For: 2.0.6, 2.1 > > Attachments: 6649-2.0.txt, 6649-2.1.txt > > > Timestamps are not used by counters and TTL are not supported, but it appears we don't reject counter updates that have "USING TIMESTAMP X" or "USING TTL X". We should since both are non-sensical (the value is completely ignored currently). > Note: we should also refuse "USING TIMESTAMP" on "DELETE" statements on counters table: even though we kind of do use a timestamp internally, it's more of an implementation detail and in fact may go away with CASSANDRA-6506 (there is also nothing clever you can do with it by providing it client side). > Note bis: strictly speaking doing that could break a few users that where setting those thinking it does something. I think that the lack of validation is more of a bug and that user that think it's doing something probably ought to know it's not sooner than later, but I could be fine with just warning in the log file for 1.2 and 2.0, and only rejecting in 2.1 if someone thinks it's safer. -- This message was sent by Atlassian JIRA (v6.1.5#6160)