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 337A7174D9 for ; Thu, 2 Oct 2014 07:16:44 +0000 (UTC) Received: (qmail 84648 invoked by uid 500); 2 Oct 2014 07:16:34 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 84551 invoked by uid 500); 2 Oct 2014 07:16:34 -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 84228 invoked by uid 99); 2 Oct 2014 07:16:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Oct 2014 07:16:34 +0000 Date: Thu, 2 Oct 2014 07:16:34 +0000 (UTC) From: "viasyn (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-8042) Inconsistent static column behavior after row deletion 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-8042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] viasyn updated CASSANDRA-8042: ------------------------------ Description: I've a table with static column defined. I'm inserting some rows with TTL defined, then one of row expires TTL of all the rows with same PK turns into null: {code} cqlsh:test> create table tt1 ( c1 text , c2 text , c3 text, cs text static, PRIMARY KEY (c1, c2) ); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-1', 'x', 's1'); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-2', 'x', 's2'); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-3', 'x', 's3'); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-4', 'x', 's4'); cqlsh:test> select * from tt1; c1 | c2 | cs | c3 ----+-----+----+---- 1 | 1-1 | s4 | x 1 | 1-2 | s4 | x 1 | 1-3 | s4 | x 1 | 1-4 | s4 | x (4 rows) cqlsh:test> delete from tt1 WHERE c1='1' AND c2 = '1-2'; cqlsh:test> select * from tt1; c1 | c2 | cs | c3 ----+-----+----+---- 1 | 1-1 | s4 | x 1 | 1-3 | s4 | x 1 | 1-4 | s4 | x (3 rows) cqlsh:test> delete from tt1 WHERE c1='1' AND c2 = '1-4'; cqlsh:test> select * from tt1; c1 | c2 | cs | c3 ----+-----+----+---- 1 | 1-1 | s4 | x 1 | 1-3 | s4 | x (2 rows) {code} Same scenario with manual DELETion leads to another result: {{ cqlsh:test> create table tt1 ( c1 text , c2 text , c3 text, cs text static, PRIMARY KEY (c1, c2) ); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-1', 'x', 's1'); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-2', 'x', 's2'); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-3', 'x', 's3'); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-4', 'x', 's4'); cqlsh:test> select * from tt1; c1 | c2 | cs | c3 ----+-----+----+---- 1 | 1-1 | s4 | x 1 | 1-2 | s4 | x 1 | 1-3 | s4 | x 1 | 1-4 | s4 | x (4 rows) cqlsh:test> delete from tt1 WHERE c1='1' AND c2 = '1-2'; cqlsh:test> select * from tt1; c1 | c2 | cs | c3 ----+-----+----+---- 1 | 1-1 | s4 | x 1 | 1-3 | s4 | x 1 | 1-4 | s4 | x (3 rows) cqlsh:test> delete from tt1 WHERE c1='1' AND c2 = '1-4'; cqlsh:test> select * from tt1; c1 | c2 | cs | c3 ----+-----+----+---- 1 | 1-1 | s4 | x 1 | 1-3 | s4 | x (2 rows) }} Is this behavior bug or it's declared somewhere? Is it really good that deletion behavior is inconsistent? was: I've a table with static column defined. I'm inserting some rows with TTL defined, then one of row expires TTL of all the rows with same PK turns into null: {{ cqlsh:test> create table tt1 ( c1 text , c2 text , c3 text, cs text static, PRIMARY KEY (c1, c2) ); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-1', 'x', 's1'); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-2', 'x', 's2'); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-3', 'x', 's3'); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-4', 'x', 's4'); cqlsh:test> select * from tt1; c1 | c2 | cs | c3 ----+-----+----+---- 1 | 1-1 | s4 | x 1 | 1-2 | s4 | x 1 | 1-3 | s4 | x 1 | 1-4 | s4 | x (4 rows) cqlsh:test> delete from tt1 WHERE c1='1' AND c2 = '1-2'; cqlsh:test> select * from tt1; c1 | c2 | cs | c3 ----+-----+----+---- 1 | 1-1 | s4 | x 1 | 1-3 | s4 | x 1 | 1-4 | s4 | x (3 rows) cqlsh:test> delete from tt1 WHERE c1='1' AND c2 = '1-4'; cqlsh:test> select * from tt1; c1 | c2 | cs | c3 ----+-----+----+---- 1 | 1-1 | s4 | x 1 | 1-3 | s4 | x (2 rows) }} Same scenario with manual DELETion leads to another result: {{ cqlsh:test> create table tt1 ( c1 text , c2 text , c3 text, cs text static, PRIMARY KEY (c1, c2) ); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-1', 'x', 's1'); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-2', 'x', 's2'); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-3', 'x', 's3'); cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-4', 'x', 's4'); cqlsh:test> select * from tt1; c1 | c2 | cs | c3 ----+-----+----+---- 1 | 1-1 | s4 | x 1 | 1-2 | s4 | x 1 | 1-3 | s4 | x 1 | 1-4 | s4 | x (4 rows) cqlsh:test> delete from tt1 WHERE c1='1' AND c2 = '1-2'; cqlsh:test> select * from tt1; c1 | c2 | cs | c3 ----+-----+----+---- 1 | 1-1 | s4 | x 1 | 1-3 | s4 | x 1 | 1-4 | s4 | x (3 rows) cqlsh:test> delete from tt1 WHERE c1='1' AND c2 = '1-4'; cqlsh:test> select * from tt1; c1 | c2 | cs | c3 ----+-----+----+---- 1 | 1-1 | s4 | x 1 | 1-3 | s4 | x (2 rows) }} Is this behavior bug or it's declared somewhere? Is it really good that deletion behavior is inconsistent? > Inconsistent static column behavior after row deletion > ------------------------------------------------------ > > Key: CASSANDRA-8042 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8042 > Project: Cassandra > Issue Type: Bug > Components: Core > Reporter: viasyn > > I've a table with static column defined. I'm inserting some rows with TTL defined, then one of row expires TTL of all the rows with same PK turns into null: > {code} > cqlsh:test> create table tt1 ( c1 text , c2 text , c3 text, cs text static, PRIMARY KEY (c1, c2) ); > cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-1', 'x', 's1'); > cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-2', 'x', 's2'); > cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-3', 'x', 's3'); > cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-4', 'x', 's4'); > cqlsh:test> select * from tt1; > c1 | c2 | cs | c3 > ----+-----+----+---- > 1 | 1-1 | s4 | x > 1 | 1-2 | s4 | x > 1 | 1-3 | s4 | x > 1 | 1-4 | s4 | x > (4 rows) > cqlsh:test> delete from tt1 WHERE c1='1' AND c2 = '1-2'; > cqlsh:test> select * from tt1; > c1 | c2 | cs | c3 > ----+-----+----+---- > 1 | 1-1 | s4 | x > 1 | 1-3 | s4 | x > 1 | 1-4 | s4 | x > (3 rows) > cqlsh:test> delete from tt1 WHERE c1='1' AND c2 = '1-4'; > cqlsh:test> select * from tt1; > c1 | c2 | cs | c3 > ----+-----+----+---- > 1 | 1-1 | s4 | x > 1 | 1-3 | s4 | x > (2 rows) > {code} > Same scenario with manual DELETion leads to another result: > {{ > cqlsh:test> create table tt1 ( c1 text , c2 text , c3 text, cs text static, PRIMARY KEY (c1, c2) ); > cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-1', 'x', 's1'); > cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-2', 'x', 's2'); > cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-3', 'x', 's3'); > cqlsh:test> insert into tt1 (c1, c2, c3, cs) VALUES ( '1', '1-4', 'x', 's4'); > cqlsh:test> select * from tt1; > c1 | c2 | cs | c3 > ----+-----+----+---- > 1 | 1-1 | s4 | x > 1 | 1-2 | s4 | x > 1 | 1-3 | s4 | x > 1 | 1-4 | s4 | x > (4 rows) > cqlsh:test> delete from tt1 WHERE c1='1' AND c2 = '1-2'; > cqlsh:test> select * from tt1; > c1 | c2 | cs | c3 > ----+-----+----+---- > 1 | 1-1 | s4 | x > 1 | 1-3 | s4 | x > 1 | 1-4 | s4 | x > (3 rows) > cqlsh:test> delete from tt1 WHERE c1='1' AND c2 = '1-4'; > cqlsh:test> select * from tt1; > c1 | c2 | cs | c3 > ----+-----+----+---- > 1 | 1-1 | s4 | x > 1 | 1-3 | s4 | x > (2 rows) > }} > Is this behavior bug or it's declared somewhere? Is it really good that deletion behavior is inconsistent? -- This message was sent by Atlassian JIRA (v6.3.4#6332)