Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 66B0C200B87 for ; Mon, 19 Sep 2016 08:53:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 65383160ACC; Mon, 19 Sep 2016 06:53:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A207D160ABC for ; Mon, 19 Sep 2016 08:53:21 +0200 (CEST) Received: (qmail 55301 invoked by uid 500); 19 Sep 2016 06:53:20 -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 55284 invoked by uid 99); 19 Sep 2016 06:53:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Sep 2016 06:53:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6F7482C0D58 for ; Mon, 19 Sep 2016 06:53:20 +0000 (UTC) Date: Mon, 19 Sep 2016 06:53:20 +0000 (UTC) From: "Alex Petrov (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CASSANDRA-12060) Establish consistent distinction between non-existing partition and NULL value for LWTs on static columns MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 19 Sep 2016 06:53:22 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-12060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15496610#comment-15496610 ] Alex Petrov edited comment on CASSANDRA-12060 at 9/19/16 6:52 AM: ------------------------------------------------------------------ I've updated tests to pass on current 2.1 and 2.2, rebased and re-triggered unit and dtests for 3.x and 3.0.x (CI pending). |[3.0|https://github.com/ifesdjeen/cassandra/tree/12060-3.0-v2] |[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12060-3.0-v2-testall/] |[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12060-3.0-v2-dtest/] | |[trunk|https://github.com/ifesdjeen/cassandra/tree/12060-trunk-v2] |[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12060-trunk-v2-testall/] |[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12060-trunk-v2-dtest/] | | | |[2.1 dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12060-2.1-nochanges-dtest/]| | | |[2.2 dtest|https://cassci.datastax.com/job/cassandra-2.2_dtest/688/]| ||[dtest patch|https://github.com/ifesdjeen/cassandra-dtest/tree/12060-trunk-v2] || was (Author: ifesdjeen): I've updated tests to pass on current 2.1 and 2.2, rebased and re-triggered unit and dtests for 3.x and 3.0.x (CI pending). |[3.0|https://github.com/ifesdjeen/cassandra/tree/12060-3.0-v2] |[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12060-3.0-v2-testall/] |[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12060-3.0-v2-dtest/] | |[trunk|https://github.com/ifesdjeen/cassandra/tree/12060-trunk-v2] |[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12060-trunk-v2-testall/] |[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12060-trunk-v2-dtest/] | | | |[2.1 dtest|https://cassci.datastax.com/job/cassandra-2.1_dtest/507/]| | | |[2.2 dtest|https://cassci.datastax.com/job/cassandra-2.2_dtest/688/]| ||[dtest patch|https://github.com/ifesdjeen/cassandra-dtest/tree/12060-trunk-v2] || > Establish consistent distinction between non-existing partition and NULL value for LWTs on static columns > --------------------------------------------------------------------------------------------------------- > > Key: CASSANDRA-12060 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12060 > Project: Cassandra > Issue Type: Bug > Reporter: Alex Petrov > Assignee: Alex Petrov > > When executing following CQL commands: > {code} > CREATE KEYSPACE test WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': '1' }; > USE test; > CREATE TABLE testtable (a int, b int, s1 int static, s2 int static, v int, PRIMARY KEY (a, b)); > INSERT INTO testtable (a,b,s1,s2,v) VALUES (2,2,2,null,2); > DELETE s1 FROM testtable WHERE a = 2 IF s2 IN (10,20,30); > {code} > The output is different between {{2.x}} and {{3.x}}: > 2.x: > {code} > cqlsh:test> DELETE s1 FROM testtable WHERE a = 2 IF s2 = 5; > [applied] | s2 > -----------+------ > False | null > {code} > 3.x: > {code} > cqlsh:test> DELETE s1 FROM testtable WHERE a = 2 IF s2 = 5; > [applied] > ----------- > False > {code} > {{2.x}} would although return same result if executed on a partition that does not exist at all: > {code} > cqlsh:test> DELETE s1 FROM testtable WHERE a = 5 IF s2 = 5; > [applied] > ----------- > False > {code} > It _might_ be related to static column LWTs, as I could not reproduce same behaviour with non-static column LWTs. The most recent change was [CASSANDRA-10532], which enabled LWT operations on static columns with partition keys only. -Another possible relation is [CASSANDRA-9842], which removed distinction between {{null}} column and non-existing row.- (striked through since same happens on pre-[CASSANDRA-9842] code. -- This message was sent by Atlassian JIRA (v6.3.4#6332)