You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2013/09/25 14:57:42 UTC

git commit: Create snapshot directory if it does not exist.

Updated Branches:
  refs/heads/cassandra-2.0 f2eaf9a13 -> 102e9119b


Create snapshot directory if it does not exist.

patch by marcuse, reviewed by jbellis for CASSANDRA-6093


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

Branch: refs/heads/cassandra-2.0
Commit: 102e9119b8f9cad55ac84bb65cf0d620b3e17533
Parents: f2eaf9a
Author: Marcus Eriksson <ma...@spotify.com>
Authored: Wed Sep 25 14:53:30 2013 +0200
Committer: Marcus Eriksson <ma...@spotify.com>
Committed: Wed Sep 25 14:56:05 2013 +0200

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/102e9119/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index fe4efc7..c8ca4f5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,8 @@
  * Fix insertion of collections with CAS (CASSANDRA-6069)
  * Correctly send metadata on SELECT COUNT (CASSANDRA-6080)
  * Track clients' remote addresses in ClientState (CASSANDRA-6070)
+ * Create snapshot dir if it does not exist when migrating
+   leveled manifest (CASSANDRA-6093)
 Merged from 1.2:
  * Allow estimated memtable size to exceed slab allocator size (CASSANDRA-6078)
  * Start MeteredFlusher earlier to prevent OOM during CL replay (CASSANDRA-6087)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/102e9119/src/java/org/apache/cassandra/db/compaction/LegacyLeveledManifest.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/LegacyLeveledManifest.java b/src/java/org/apache/cassandra/db/compaction/LegacyLeveledManifest.java
index 645c2be..e10be10 100644
--- a/src/java/org/apache/cassandra/db/compaction/LegacyLeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LegacyLeveledManifest.java
@@ -134,6 +134,8 @@ public class LegacyLeveledManifest
         if (manifestFile != null)
         {
             File snapshotDirectory = new File(new File(manifestFile.getParentFile(), Directories.SNAPSHOT_SUBDIR), snapshotName);
+            if (!snapshotDirectory.exists())
+                snapshotDirectory.mkdirs();
             File target = new File(snapshotDirectory, manifestFile.getName());
             FileUtils.createHardLink(manifestFile, target);
         }