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 CF87B17D3B for ; Tue, 13 Jan 2015 10:22:33 +0000 (UTC) Received: (qmail 44783 invoked by uid 500); 13 Jan 2015 10:22:35 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 44748 invoked by uid 500); 13 Jan 2015 10:22:35 -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 44737 invoked by uid 99); 13 Jan 2015 10:22:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jan 2015 10:22:35 +0000 Date: Tue, 13 Jan 2015 10:22:35 +0000 (UTC) From: =?utf-8?Q?Jimmy_M=C3=A5rdell_=28JIRA=29?= To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-8414) Avoid loops over array backed iterators that call iter.remove() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-8414?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jimmy M=C3=A5rdell updated CASSANDRA-8414: ------------------------------------- Attachment: cassandra-2.1-8414-6.txt > Avoid loops over array backed iterators that call iter.remove() > --------------------------------------------------------------- > > Key: CASSANDRA-8414 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8414 > Project: Cassandra > Issue Type: Improvement > Components: Core > Reporter: Richard Low > Assignee: Jimmy M=C3=A5rdell > Labels: performance > Fix For: 2.1.3 > > Attachments: cassandra-2.0-8414-1.txt, cassandra-2.0-8414-2.txt, = cassandra-2.0-8414-3.txt, cassandra-2.0-8414-4.txt, cassandra-2.0-8414-5.tx= t, cassandra-2.1-8414-5.txt, cassandra-2.1-8414-6.txt > > > I noticed from sampling that sometimes compaction spends almost all of it= s time in iter.remove() in ColumnFamilyStore.removeDeletedStandard. It turn= s out that the cf object is using ArrayBackedSortedColumns, so deletes are = from an ArrayList. If the majority of your columns are GCable tombstones th= en this is O(n^2). The data structure should be changed or a copy made to a= void this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)