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 ECEAE1882E for ; Mon, 9 Nov 2015 19:35:11 +0000 (UTC) Received: (qmail 19764 invoked by uid 500); 9 Nov 2015 19:35:11 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 19698 invoked by uid 500); 9 Nov 2015 19:35:11 -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 19398 invoked by uid 99); 9 Nov 2015 19:35:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Nov 2015 19:35:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 32EF12C1F69 for ; Mon, 9 Nov 2015 19:35:11 +0000 (UTC) Date: Mon, 9 Nov 2015 19:35:11 +0000 (UTC) From: "Jim Witschey (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-10599) Delete operation not deleting sometimes by Trigger augment method 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-10599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jim Witschey updated CASSANDRA-10599: ------------------------------------- Fix Version/s: 2.2.x > Delete operation not deleting sometimes by Trigger augment method > ------------------------------------------------------------------ > > Key: CASSANDRA-10599 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10599 > Project: Cassandra > Issue Type: Bug > Components: CQL, Tools > Environment: CentOS 6.6 Cassandra 2.2.2 > Reporter: Ashraful Islam > Fix For: 2.2.x > > Original Estimate: 1h > Remaining Estimate: 1h > > I was trying to delete a row from one table when another table's row with the same primary key has been deleted > {code:title=DeleteToDelete.java|borderStyle=solid} > @Override > public Collection augment(ByteBuffer key, ColumnFamily update) { > String keySpace = properties.getProperty("keyspace"); > String columnFamily = properties.getProperty("table"); > if (!update.deletionInfo().isLive()) { > CFMetaData cfMetaData = Schema.instance.getCFMetaData(keySpace, columnFamily); > for (ColumnDefinition columnDefinition : cfMetaData.allColumns()) { > Mutation mutation = new Mutation(keySpace, key); > mutation.delete(columnFamily, CellNames.simpleSparse(columnDefinition.name), System.currentTimeMillis()); > } > } > } > {code} > *This code is not deleting row with the same key that have been inserted with insert into values command.* > *but if i insert the value by replacing* > {code} > mutation.delete(columnFamily, CellNames.simpleSparse(columnDefinition.name), System.currentTimeMillis()); > {code} > *by* > {code} > mutation.add(columnFamily, CellNames.simpleSparse(columnDefinition.name), ByteBufferUtil.bytes(35), System.currentTimeMillis()); > {code} > *in the above code, Then the value is deleted with the trigger* -- This message was sent by Atlassian JIRA (v6.3.4#6332)