cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1187844 - in /cassandra/branches/cassandra-1.0: CHANGES.txt src/java/org/apache/cassandra/db/ColumnFamilyStore.java src/java/org/apache/cassandra/db/migration/DropColumnFamily.java src/java/org/apache/cassandra/db/migration/DropKeyspace.java
Date Sun, 23 Oct 2011 04:07:28 GMT
Author: jbellis
Date: Sun Oct 23 04:07:28 2011
New Revision: 1187844

URL: http://svn.apache.org/viewvc?rev=1187844&view=rev
Log:
use CF/KS names as snapshot prefix for drop + truncate operations
patch by Yuki Morishita and jbellis for CASSANDRA-2997

Modified:
    cassandra/branches/cassandra-1.0/CHANGES.txt
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/migration/DropColumnFamily.java
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/migration/DropKeyspace.java

Modified: cassandra/branches/cassandra-1.0/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/CHANGES.txt?rev=1187844&r1=1187843&r2=1187844&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/CHANGES.txt (original)
+++ cassandra/branches/cassandra-1.0/CHANGES.txt Sun Oct 23 04:07:28 2011
@@ -22,7 +22,8 @@
    post-task execution, enabling more consistent leveled compaction 
    (CASSANDRA-3391)
  * Cache HSHA threads (CASSANDRA-3372)
-
+ * use CF/KS names as snapshot prefix for drop + truncate operations
+   (CASSANDRA-2997)
 Merged from 0.8:
  * (CQL) update grammar to require key clause in DELETE statement
    (CASSANDRA-3349)

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=1187844&r1=1187843&r2=1187844&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Sun Oct 23 04:07:28 2011
@@ -1648,7 +1648,7 @@ public class ColumnFamilyStore implement
             throw new AssertionError(e);
         }
         long truncatedAt = System.currentTimeMillis();
-        snapshot(Table.getTimestampedSnapshotName("before-truncate"));
+        snapshot(Table.getTimestampedSnapshotName(columnFamily));
 
         return CompactionManager.instance.submitTruncate(this, truncatedAt);
     }

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/migration/DropColumnFamily.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/migration/DropColumnFamily.java?rev=1187844&r1=1187843&r2=1187844&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/migration/DropColumnFamily.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/migration/DropColumnFamily.java
Sun Oct 23 04:07:28 2011
@@ -78,7 +78,7 @@ public class DropColumnFamily extends Mi
 
         if (!StorageService.instance.isClientMode())
         {
-            cfs.snapshot(Table.getTimestampedSnapshotName(null));
+            cfs.snapshot(Table.getTimestampedSnapshotName(cfs.columnFamily));
 
             CompactionManager.instance.getCompactionLock().lock();
             cfs.flushLock.lock();

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/migration/DropKeyspace.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/migration/DropKeyspace.java?rev=1187844&r1=1187843&r2=1187844&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/migration/DropKeyspace.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/migration/DropKeyspace.java
Sun Oct 23 04:07:28 2011
@@ -47,7 +47,7 @@ public class DropKeyspace extends Migrat
 
     public void applyModels() throws IOException
     {
-        String snapshotName = Table.getTimestampedSnapshotName(null);
+        String snapshotName = Table.getTimestampedSnapshotName(name);
         CompactionManager.instance.getCompactionLock().lock();
         try
         {



Mime
View raw message