cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefa...@apache.org
Subject [03/10] cassandra git commit: Make sure compaction stats are updated when compaction is interrupted (back-port from 3.0)
Date Thu, 23 Feb 2017 09:06:10 GMT
Make sure compaction stats are updated when compaction is interrupted (back-port from 3.0)

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/dffb1a6d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dffb1a6d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dffb1a6d

Branch: refs/heads/cassandra-3.11
Commit: dffb1a6da8e2c3a9c08bb94bfd12130b9ddded74
Parents: 6ffd5cc
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 Feb 23 08:58:11 2017 +0000

----------------------------------------------------------------------
 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/dffb1a6d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 033b366..b565acb 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.10
+ * Make sure compaction stats are updated when compaction is interrupted (Backport from 3.0,
CASSANDRA-12100)
  * Fix flaky LongLeveledCompactionStrategyTest (CASSANDRA-12202)
  * Fix failing COPY TO STDOUT (CASSANDRA-12497)
  * Fix ColumnCounter::countAll behaviour for reverse queries (CASSANDRA-13222)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/dffb1a6d/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 7489b3d..006c8ff 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
@@ -165,13 +165,14 @@ public class CompactionTask extends AbstractCompactionTask
                 ci = new CompactionIterable(compactionType, scanners.scanners, controller,
sstableFormat, taskId);
                 try (CloseableIterator<AbstractCompactedRow> iter = ci.iterator())
                 {
-                    if (collector != null)
-                        collector.beginCompaction(ci);
                     long lastCheckObsoletion = start;
 
                     if (!controller.cfs.getCompactionStrategy().isActive)
                         throw new CompactionInterruptedException(ci.getCompactionInfo());
 
+                    if (collector != null)
+                        collector.beginCompaction(ci);
+
                     try (CompactionAwareWriter writer = getCompactionAwareWriter(cfs, transaction,
actuallyCompact))
                     {
                         estimatedKeys = writer.estimatedKeys();


Mime
View raw message