cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [5/6] git commit: change snapshot-before-compaction to only snapshot (w/o flush) CFS being compacted patch by jbellis; reviewed by slebresne for CASSANDRA-3803
Date Thu, 09 Feb 2012 03:54:40 GMT
change snapshot-before-compaction to only snapshot (w/o flush) CFS being compacted
patch by jbellis; reviewed by slebresne for CASSANDRA-3803


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/22b8a972
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/22b8a972
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/22b8a972

Branch: refs/heads/cassandra-1.1
Commit: 22b8a9725b384c0fbee9356ef15e0728bbfd2a58
Parents: d9ed037
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Sun Feb 5 14:23:35 2012 -0600
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed Feb 8 21:52:53 2012 -0600

----------------------------------------------------------------------
 CHANGES.txt                                        |    5 +++++
 .../org/apache/cassandra/db/ColumnFamilyStore.java |    2 +-
 .../cassandra/db/compaction/CompactionTask.java    |    2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/22b8a972/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b51e385..cca24a9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,8 @@
+1.0.9
+ * Only snapshot CF being compacted for snapshot_before_compaction 
+   (CASSANDRA-3803)
+
+
 1.0.8
  * Log active compactions in StatusLogger (CASSANDRA-3703)
  * Compute more accurate compaction score per level (CASSANDRA-3790)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/22b8a972/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 7a1cd20..6f8392d 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1389,7 +1389,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
         return metadata.comparator;
     }
 
-    private void snapshotWithoutFlush(String snapshotName)
+    public void snapshotWithoutFlush(String snapshotName)
     {
         for (ColumnFamilyStore cfs : concatWithIndexes())
         {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/22b8a972/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 a42b9ff..ece5f19 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
@@ -100,7 +100,7 @@ public class CompactionTask extends AbstractCompactionTask
         }
 
         if (DatabaseDescriptor.isSnapshotBeforeCompaction())
-            cfs.table.snapshot(System.currentTimeMillis() + "-" + "compact-" + cfs.columnFamily);
+            cfs.snapshotWithoutFlush(System.currentTimeMillis() + "-" + "compact-" + cfs.columnFamily);
 
         // sanity check: all sstables must belong to the same cfs
         for (SSTableReader sstable : toCompact)


Mime
View raw message