cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject svn commit: r1099816 - in /cassandra/branches/cassandra-0.7: CHANGES.txt src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Date Thu, 05 May 2011 14:19:51 GMT
Author: slebresne
Date: Thu May  5 14:19:51 2011
New Revision: 1099816

URL: http://svn.apache.org/viewvc?rev=1099816&view=rev
Log:
include indexes in snapshot
patch by jbellis; reviewed by slebresne for CASSANDRA-2596

Modified:
    cassandra/branches/cassandra-0.7/CHANGES.txt
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java

Modified: cassandra/branches/cassandra-0.7/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/CHANGES.txt?rev=1099816&r1=1099815&r2=1099816&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.7/CHANGES.txt Thu May  5 14:19:51 2011
@@ -10,6 +10,7 @@
    schema (CASSANDRA-2536)
  * faster flushes and compaction from fixing excessively pessimistic 
    rebuffering in BRAF (CASSANDRA-2581)
+ * include indexes in snapshots (CASSANDRA-2596)
 
 
 0.7.5

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=1099816&r1=1099815&r2=1099816&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
(original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Thu May  5 14:19:51 2011
@@ -1702,24 +1702,27 @@ public class ColumnFamilyStore implement
 
     private void snapshotWithoutFlush(String snapshotName)
     {
-        for (SSTableReader ssTable : ssTables)
+        for (ColumnFamilyStore cfs : concatWithIndexes())
         {
-            try
-            {
-                // mkdir
-                File dataDirectory = ssTable.descriptor.directory.getParentFile();
-                String snapshotDirectoryPath = Table.getSnapshotPath(dataDirectory.getAbsolutePath(),
table.name, snapshotName);
-                FileUtils.createDirectory(snapshotDirectoryPath);
-
-                // hard links
-                ssTable.createLinks(snapshotDirectoryPath);
-                if (logger.isDebugEnabled())
-                    logger.debug("Snapshot for " + table + " keyspace data file " + ssTable.getFilename()
+
-                        " created in " + snapshotDirectoryPath);
-            }
-            catch (IOException e)
+            for (SSTableReader ssTable : cfs.ssTables)
             {
-                throw new IOError(e);
+                try
+                {
+                    // mkdir
+                    File dataDirectory = ssTable.descriptor.directory.getParentFile();
+                    String snapshotDirectoryPath = Table.getSnapshotPath(dataDirectory.getAbsolutePath(),
table.name, snapshotName);
+                    FileUtils.createDirectory(snapshotDirectoryPath);
+
+                    // hard links
+                    ssTable.createLinks(snapshotDirectoryPath);
+                    if (logger.isDebugEnabled())
+                        logger.debug("Snapshot for " + table + " keyspace data file " + ssTable.getFilename()
+
+                            " created in " + snapshotDirectoryPath);
+                }
+                catch (IOException e)
+                {
+                    throw new IOError(e);
+                }
             }
         }
     }



Mime
View raw message