cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefa...@apache.org
Subject [1/6] cassandra git commit: Make sure compaction stats are updated when compaction is interrupted
Date Thu, 11 Aug 2016 01:13:39 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 2691c9e4e -> 05483a962
  refs/heads/cassandra-3.9 1fff069ad -> 15fd71f9a
  refs/heads/trunk f467c8523 -> eda4b58e1


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.0
Commit: 05483a962c64c350315fc738c697980b22361cc3
Parents: 2691c9e
Author: Stefania Alborghetti <stefania.alborghetti@datastax.com>
Authored: Thu Aug 4 14:20:38 2016 +0800
Committer: Stefania Alborghetti <stefania.alborghetti@datastax.com>
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();


Mime
View raw message