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 6BF14200BFF for ; Tue, 17 Jan 2017 19:40:35 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6B02B160B52; Tue, 17 Jan 2017 18:40:35 +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 BE901160B30 for ; Tue, 17 Jan 2017 19:40:34 +0100 (CET) Received: (qmail 36774 invoked by uid 500); 17 Jan 2017 18:40: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 36763 invoked by uid 99); 17 Jan 2017 18:40:34 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jan 2017 18:40:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5B814C2528 for ; Tue, 17 Jan 2017 18:40:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 735kztz6NePV for ; Tue, 17 Jan 2017 18:40:29 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id ABE635FE2D for ; Tue, 17 Jan 2017 18:40:28 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 144EDE7370 for ; Tue, 17 Jan 2017 18:40:28 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 877ED25287 for ; Tue, 17 Jan 2017 18:40:26 +0000 (UTC) Date: Tue, 17 Jan 2017 18:40:26 +0000 (UTC) From: "Alex Petrov (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-13075) Indexer is not correctly invoked when building indexes over sstables MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 17 Jan 2017 18:40:35 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-13075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15826571#comment-15826571 ] Alex Petrov commented on CASSANDRA-13075: ----------------------------------------- > Processing the collected range tombstones You're right. I have overlooked the tombstones processing. It was "functioning" correctly, although not passing elements where I expected them. I remember stepping into it with a debugger, so I made the wrong assumption. I've added proper tests for it now. I'll check the paging tomorrow once again to make sure range tombstones won't span across pages. This also allowed to address the other two points (additional begin/finish calls along with passing correct rows). The last point appears to be a github highlighting glitch, since that's all I have changed in my diff view locally: {code} private final DataLimits pageLimits; - private final DataLimits.Counter counter; + protected final DataLimits.Counter counter; private DecoratedKey currentKey; {code} > Indexer is not correctly invoked when building indexes over sstables > -------------------------------------------------------------------- > > Key: CASSANDRA-13075 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13075 > Project: Cassandra > Issue Type: Bug > Reporter: Sergio Bossa > Assignee: Alex Petrov > Priority: Critical > Attachments: CustomIndexTest.java > > > Following CASSANDRA-12796, {{SecondaryIndexManager#indexPartition()}} calls each {{Indexer}} {{begin}} and {{finish}} methods multiple times per partition (depending on the page size), as {{PartitionIterators#getOnlyElement()}} returns an empty partition even when the iterator is exhausted. > This leads to bugs for {{Indexer}} implementations doing actual work in those methods, but even worse, it provides the {{Indexer}} the same input of an empty partition containing only a non-live partition deletion, as the {{Indexer#partitionDelete()}} method is *not* actually called. > My proposed solution: > 1) Stop the iteration before the empty partition is returned and ingested into the {{Indexer}}. > 2) Actually call the {{Indexer#partitionDelete()}} method inside {{SecondaryIndexManager#indexPartition()}} (which requires to use a filtered iterator so it actually contains the deletion info). -- This message was sent by Atlassian JIRA (v6.3.4#6332)