Updated Branches: refs/heads/trunk c0d328bf0 -> be236eae2
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/trunk Commit: 102e9119b8f9cad55ac84bb65cf0d620b3e17533 Parents: f2eaf9a Author: Marcus Eriksson <marc...@spotify.com> Authored: Wed Sep 25 14:53:30 2013 +0200 Committer: Marcus Eriksson <marc...@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); }