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 99427180BD for ; Mon, 23 Nov 2015 14:04:11 +0000 (UTC) Received: (qmail 86116 invoked by uid 500); 23 Nov 2015 14:04:11 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 86068 invoked by uid 500); 23 Nov 2015 14:04: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 85953 invoked by uid 99); 23 Nov 2015 14:04:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Nov 2015 14:04:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 186BC2C1F68 for ; Mon, 23 Nov 2015 14:04:11 +0000 (UTC) Date: Mon, 23 Nov 2015 14:04:11 +0000 (UTC) From: "Sam Tunnicliffe (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-10681) make index building pluggable via IndexBuildTask 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-10681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15022125#comment-15022125 ] Sam Tunnicliffe commented on CASSANDRA-10681: --------------------------------------------- bq. allocation of the build task would require careful closing of them (which your patch doesn't do good catch, thanks. bq. we make a contract that each index type has to have it's own build task to be grouped I still think it's overly restrictive to only group by index type, but the tablewide support patch doesn't necessarily entail this. If we introduce a publicly accessible singleton and use that rather the private {{CassandraIndexSupport}} instance on {{CassandraIndex}} we should be able to share the build task among all indexes which are built in this way. I'd also probably rename {{CassandraIndexSupport}} and {{CassandraIndexBuilder}} seeing as they could both be reused by any impl. Also, the naming of {{TableWideSupport}} is a bit obscure for me, can we just use {{IndexBuildingSupport}}? I guess the iface could be extended later with other stuff, but we should probably cross that bridge if/when we come to it. Finally, the patch as is has a bug: {{SIM::buildIndexBlocking}} always throws an NPE as it should be using {{Map::computeIfAbsent}} instead of {{Map::putIfAbsent}}. I've pushed an updated version with those suggested changes [here|https://github.com/beobal/cassandra/tree/10681-v2-trunk], wdyt? > make index building pluggable via IndexBuildTask > ------------------------------------------------ > > Key: CASSANDRA-10681 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10681 > Project: Cassandra > Issue Type: Sub-task > Components: Local Write-Read Paths > Reporter: Pavel Yaskevich > Assignee: Pavel Yaskevich > Priority: Minor > Labels: sasi > Fix For: 3.2 > > Attachments: 0001-add-table-support-for-multi-table-builds.patch, 0001-make-index-building-pluggable-via-IndexBuildTask.patch > > > Currently index building assumes one and only way to build all of the indexes - through SecondaryIndexBuilder - which merges all of the sstables together, collates columns etc. Such works fine for built-in indexes but not for SASI since it's attaches to every SSTable individually. We need a "IndexBuildTask" interface (based on CompactionInfo.Holder) to be returned from Index on demand to give power to SI interface implementers to decide how build should work. This might be less effective for CassandraIndex, since this effectively means that collation will have to be done multiple times on the same data, but nevertheless is a good compromise for clean interface to outside world. -- This message was sent by Atlassian JIRA (v6.3.4#6332)