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 7E10410BDC for ; Wed, 20 Nov 2013 03:17:50 +0000 (UTC) Received: (qmail 98881 invoked by uid 500); 20 Nov 2013 03:17:38 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 98836 invoked by uid 500); 20 Nov 2013 03:17:29 -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 98790 invoked by uid 99); 20 Nov 2013 03:17:22 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Nov 2013 03:17:22 +0000 Date: Wed, 20 Nov 2013 03:17:22 +0000 (UTC) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CASSANDRA-5682) When the Cassandra delete keys in secondary Index? 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-5682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis resolved CASSANDRA-5682. --------------------------------------- Resolution: Not A Problem bq. I think that the Cassandra needs the compaction function for secondary index . Possible since CASSANDRA-4464 > When the Cassandra delete keys in secondary Index? > -------------------------------------------------- > > Key: CASSANDRA-5682 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5682 > Project: Cassandra > Issue Type: Improvement > Components: Core > Affects Versions: 2.0.1 > Environment: normal x86 PC (i3 CPU + 4GB ram) + Ubuntu 12.04 > Reporter: YounwooKim > Priority: Minor > > How can i reduce the size of secondary index? > Obviously, I delete many keys, and tried flush, compact, cleanup, rebuild_index using nodetool. However, i can't reduce the size of secondary index. ( Of course, the size of table(Primary key) is reduced. ) > Therefore, I found out the hint from the Cassandra source code, and I guess a feature of secondary index deletion. > 1) When I request deletion of key, and the key is in the sstable(not in the memtable), the Cassandra doesn't insert the tombstone to the sstable for secondary index.( Unlike the table ) > ( from AbstractSimpleColumnSecondaryIndex.delete() function. ) > 2) After scaning the secondary index, the tombstone is maded in secondary index. > ( from KeysSearcher.getIndexedIterator() function. It is called by index scan verb. ) > 3) Cleanup command in nodetool is used to delete out of range keys. ( Cleanup command don't care about deleted keys ) > ( from CompactionManager.doCleanupCompaction() function. ) > After this, I scan deleted keys using 'Where' clause, and I can reduce the size of secondary index. I think that it is only one way to reduce the size of secondary index. > Is this a correct conclusion? I can't found related articles and other methods. > I think that the Cassandra needs the compaction function for secondary index . -- This message was sent by Atlassian JIRA (v6.1#6144)