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 3C6991085A for ; Tue, 6 Jan 2015 09:26:34 +0000 (UTC) Received: (qmail 93758 invoked by uid 500); 6 Jan 2015 09:26:35 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 93553 invoked by uid 500); 6 Jan 2015 09:26: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 93359 invoked by uid 99); 6 Jan 2015 09:26:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2015 09:26:35 +0000 Date: Tue, 6 Jan 2015 09:26:34 +0000 (UTC) From: "Benedict (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-8547) Make RangeTombstone.Tracker.isDeleted() faster 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-8547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14265891#comment-14265891 ] Benedict commented on CASSANDRA-8547: ------------------------------------- This looks like something [~slebresne] should take a look at. > Make RangeTombstone.Tracker.isDeleted() faster > ---------------------------------------------- > > Key: CASSANDRA-8547 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8547 > Project: Cassandra > Issue Type: Improvement > Components: Core > Environment: 2.0.11 > Reporter: Dominic Letz > Assignee: Dominic Letz > Fix For: 2.1.3 > > Attachments: Selection_044.png, cassandra-2.0.11-8547.txt, cassandra-2.1-8547.txt, rangetombstone.tracker.txt > > > During compaction and repairs with many tombstones an exorbitant amount of time is spend in RangeTombstone.Tracker.isDeleted(). > The amount of time spend there can be so big that compactions and repairs look "stalled" and the time remaining time estimated frozen at the same value for days. > Using visualvm I've been sample profiling the code during execution and both in Compaction as well as during repairs found this. (point in time backtraces attached) > Looking at the code the problem is obviously the linear scanning: > {code} > public boolean isDeleted(Column column) > { > for (RangeTombstone tombstone : ranges) > { > if (comparator.compare(column.name(), tombstone.min) >= 0 > && comparator.compare(column.name(), tombstone.max) <= 0 > && tombstone.maxTimestamp() >= column.timestamp()) > { > return true; > } > } > return false; > } > {code} > I would like to propose to change this and instead use a sorted list (e.g. RangeTombstoneList) here instead. -- This message was sent by Atlassian JIRA (v6.3.4#6332)