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 98A64200B71 for ; Wed, 17 Aug 2016 00:42:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 97589160ABD; Tue, 16 Aug 2016 22:42:06 +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 E2A87160ABF for ; Wed, 17 Aug 2016 00:42:05 +0200 (CEST) Received: (qmail 98214 invoked by uid 500); 16 Aug 2016 22:42:03 -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 97607 invoked by uid 99); 16 Aug 2016 22:42:02 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2016 22:42:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8F01CEF797; Tue, 16 Aug 2016 22:42:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mshuler@apache.org To: commits@cassandra.apache.org Date: Tue, 16 Aug 2016 22:42:13 -0000 Message-Id: <3ced31679aa14fc28bde7c71ebed259d@git.apache.org> In-Reply-To: <6f63b6836b6c4f2c9c7a6f6368b33337@git.apache.org> References: <6f63b6836b6c4f2c9c7a6f6368b33337@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [12/50] [abbrv] cassandra git commit: Make sure compaction stats are updated when compaction is interrupted archived-at: Tue, 16 Aug 2016 22:42:06 -0000 Make sure compaction stats are updated when compaction is interrupted patch by Stefania Alborghetti; reviewed by Marcus Eriksson for CASSANDRA-12100 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/05483a96 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/05483a96 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/05483a96 Branch: refs/heads/cassandra-3.8 Commit: 05483a962c64c350315fc738c697980b22361cc3 Parents: 2691c9e Author: Stefania Alborghetti Authored: Thu Aug 4 14:20:38 2016 +0800 Committer: Stefania Alborghetti Committed: Thu Aug 11 09:09:57 2016 +0800 ---------------------------------------------------------------------- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/compaction/CompactionTask.java | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/05483a96/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index e1bc9f3..bd3bb75 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.9 + * Make sure compaction stats are updated when compaction is interrupted (CASSANDRA-12100) * Fix potential bad messaging service message for paged range reads within mixed-version 3.x clusters (CASSANDRA-12249) * Change commitlog and sstables to track dirty and clean intervals (CASSANDRA-11828) http://git-wip-us.apache.org/repos/asf/cassandra/blob/05483a96/src/java/org/apache/cassandra/db/compaction/CompactionTask.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java index 9a7aa98..7e4ed41 100644 --- a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java +++ b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java @@ -164,13 +164,14 @@ public class CompactionTask extends AbstractCompactionTask AbstractCompactionStrategy.ScannerList scanners = strategy.getScanners(actuallyCompact); CompactionIterator ci = new CompactionIterator(compactionType, scanners.scanners, controller, nowInSec, taskId)) { - if (collector != null) - collector.beginCompaction(ci); long lastCheckObsoletion = start; if (!controller.cfs.getCompactionStrategyManager().isActive) throw new CompactionInterruptedException(ci.getCompactionInfo()); + if (collector != null) + collector.beginCompaction(ci); + try (CompactionAwareWriter writer = getCompactionAwareWriter(cfs, getDirectories(), transaction, actuallyCompact)) { estimatedKeys = writer.estimatedKeys();