Fix snapshots in use get deleted during snapshot repair

patch by yukim; reviewed by jbellis for CASSANDRA-6011


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

Branch: refs/heads/cassandra-2.0
Commit: 806a45225bb5fdfd5f21cbc90456dc9dbe7c4461
Parents: 2ce9327
Author: Yuki Morishita <yu...@apache.org>
Authored: Fri Sep 13 11:37:22 2013 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Fri Sep 13 11:37:22 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                                      | 1 +
 .../org/apache/cassandra/db/compaction/CompactionManager.java    | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/806a4522/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 049544e..e124ac0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -17,6 +17,7 @@
  * Support null in CQL3 functions (CASSANDRA-5910)
  * Replace the deprecated MapMaker with CacheLoader (CASSANDRA-6007)
  * Add SSTableDeletingNotification to DataTracker (CASSANDRA-6010)
+ * Fix snapshots in use get deleted during snapshot repair (CASSANDRA-6011)
 
 
 1.2.9

http://git-wip-us.apache.org/repos/asf/cassandra/blob/806a4522/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 44b973f..4c9c707 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -770,8 +770,8 @@ public class CompactionManager implements 
CompactionManagerMBean
         {
             SSTableReader.releaseReferences(sstables);
             iter.close();
-            if (cfs.table.snapshotExists(validator.request.sessionid))
-                cfs.table.clearSnapshot(validator.request.sessionid);
+            if (cfs.snapshotExists(validator.request.sessionid))
+                cfs.clearSnapshot(validator.request.sessionid);
 
             metrics.finishCompaction(ci);
         }

Reply via email to