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 E383F18659 for ; Wed, 18 Nov 2015 08:27:11 +0000 (UTC) Received: (qmail 38296 invoked by uid 500); 18 Nov 2015 08:27:11 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 38142 invoked by uid 500); 18 Nov 2015 08:27: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 37860 invoked by uid 99); 18 Nov 2015 08:27:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Nov 2015 08:27:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 231192C1F72 for ; Wed, 18 Nov 2015 08:27:11 +0000 (UTC) Date: Wed, 18 Nov 2015 08:27:11 +0000 (UTC) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-10690) Secondary index does not process deletes unless columns are specified 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-10690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15010462#comment-15010462 ] Sylvain Lebresne commented on CASSANDRA-10690: ---------------------------------------------- bq. the Index interface is a somewhat public API Meant to, but forgot to mention that. I'm not too fussed about breaking that API right now cause it's brand new, 3.0 is so very new and adapting your custom index code to the change is trivial. But yes, it's a breaking change strictly speaking and I'm totally fine only doing that in 3.2 if we prefer. > Secondary index does not process deletes unless columns are specified > --------------------------------------------------------------------- > > Key: CASSANDRA-10690 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10690 > Project: Cassandra > Issue Type: Bug > Components: Local Write-Read Paths > Reporter: Tyler Hobbs > Fix For: 3.0.1, 3.1 > > > The new secondary index API does not notify indexes of single-row or slice deletions unless specific columns are deleted. I believe the problem is that in {{SecondaryIndexManager.newUpdateTransaction()}}, we skip indexes unless {{index.indexes(update.columns())}}. When no columns are specified in the the deletion, {{update.columns()}} is empty, which causes all indexes to be skipped. > I think the correct fix is to do something like this in the {{ModificationStatement}} constructor: > {code} > if (type == StatementType.DELETE && modifiedColumns.isEmpty()) > modifiedColumns = cfm.partitionColumns(); > {code} > However, I'm not sure if that may have unintended side-effects. What do you think, [~slebresne]? -- This message was sent by Atlassian JIRA (v6.3.4#6332)