You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2013/12/07 11:32:28 UTC
[1/3] git commit: Fix handling of concurrent directory creation
failure
Updated Branches:
refs/heads/trunk e6170fef9 -> 5c379c54b
Fix handling of concurrent directory creation failure
patch by Ryan Fowler; reviewed by Aleksey Yeschenko for
CASSANDRA-6459
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/510eabfe
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/510eabfe
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/510eabfe
Branch: refs/heads/trunk
Commit: 510eabfeb4111b6acb27ce1c443e5aef99341d1d
Parents: 86e949f
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Sat Dec 7 13:30:26 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Sat Dec 7 13:30:26 2013 +0300
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/db/Directories.java | 2 +-
.../apache/cassandra/db/DirectoriesTest.java | 22 ++++++++++++++++++++
3 files changed, 24 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/510eabfe/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 3b1f2f6..6f5f23b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -15,6 +15,7 @@
* Fix cache persistence when both row and key cache are enabled
(CASSANDRA-6413)
* (Hadoop) add describe_local_ring (CASSANDRA-6268)
+ * Fix handling of concurrent directory creation failure (CASSANDRA-6459)
1.2.12
http://git-wip-us.apache.org/repos/asf/cassandra/blob/510eabfe/src/java/org/apache/cassandra/db/Directories.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/Directories.java b/src/java/org/apache/cassandra/db/Directories.java
index 351c0c0..8973327 100644
--- a/src/java/org/apache/cassandra/db/Directories.java
+++ b/src/java/org/apache/cassandra/db/Directories.java
@@ -448,7 +448,7 @@ public class Directories
if (!dir.isDirectory())
throw new AssertionError(String.format("Invalid directory path %s: path exists but is not a directory", dir));
}
- else if (!dir.mkdirs())
+ else if (!dir.mkdirs() && !(dir.exists() && dir.isDirectory()))
{
throw new FSWriteError(new IOException("Unable to create directory " + dir), dir);
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/510eabfe/test/unit/org/apache/cassandra/db/DirectoriesTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/DirectoriesTest.java b/test/unit/org/apache/cassandra/db/DirectoriesTest.java
index dce6f87..2c055c7 100644
--- a/test/unit/org/apache/cassandra/db/DirectoriesTest.java
+++ b/test/unit/org/apache/cassandra/db/DirectoriesTest.java
@@ -20,6 +20,7 @@ package org.apache.cassandra.db;
import java.io.File;
import java.io.IOException;
import java.util.*;
+import java.util.concurrent.*;
import org.junit.AfterClass;
import org.junit.Assert;
@@ -236,4 +237,25 @@ public class DirectoriesTest
DatabaseDescriptor.setDiskFailurePolicy(origPolicy);
}
}
+
+ @Test
+ public void testMTSnapshots() throws Exception
+ {
+ for (final String cf : CFS)
+ {
+ final Directories directories = Directories.create(KS, cf);
+ Assert.assertEquals(cfDir(cf), directories.getDirectoryForNewSSTables(0));
+ final String n = Long.toString(System.nanoTime());
+ Callable<File> directoryGetter = new Callable<File>() {
+ public File call() throws Exception {
+ Descriptor desc = new Descriptor(cfDir(cf), KS, cf, 1, false);
+ return directories.getSnapshotDirectory(desc, n);
+ }
+ };
+ List<Future<File>> invoked = Executors.newFixedThreadPool(2).invokeAll(Arrays.asList(directoryGetter, directoryGetter));
+ for(Future<File> fut:invoked) {
+ Assert.assertTrue(fut.get().exists());
+ }
+ }
+ }
}
[3/3] git commit: Merge branch 'cassandra-2.0' into trunk
Posted by al...@apache.org.
Merge branch 'cassandra-2.0' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5c379c54
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5c379c54
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5c379c54
Branch: refs/heads/trunk
Commit: 5c379c54b9c1806152e83a5cce76fc9ad14e1228
Parents: e6170fe 3c15ff2
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Sat Dec 7 13:32:16 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Sat Dec 7 13:32:16 2013 +0300
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/db/Directories.java | 2 +-
.../apache/cassandra/db/DirectoriesTest.java | 22 ++++++++++++++++++++
3 files changed, 24 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5c379c54/CHANGES.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5c379c54/src/java/org/apache/cassandra/db/Directories.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5c379c54/test/unit/org/apache/cassandra/db/DirectoriesTest.java
----------------------------------------------------------------------
[2/3] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Posted by al...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3c15ff2e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3c15ff2e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3c15ff2e
Branch: refs/heads/trunk
Commit: 3c15ff2e44aa06491366eb4a4a4021c9ba4e535b
Parents: f2a82ee 510eabf
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Sat Dec 7 13:31:37 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Sat Dec 7 13:31:37 2013 +0300
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/db/Directories.java | 2 +-
.../apache/cassandra/db/DirectoriesTest.java | 22 ++++++++++++++++++++
3 files changed, 24 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/3c15ff2e/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index fc512cd,6f5f23b..e72e5d2
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -20,45 -15,10 +20,46 @@@ Merged from 1.2
* Fix cache persistence when both row and key cache are enabled
(CASSANDRA-6413)
* (Hadoop) add describe_local_ring (CASSANDRA-6268)
+ * Fix handling of concurrent directory creation failure (CASSANDRA-6459)
-1.2.12
+2.0.3
+ * Fix FD leak on slice read path (CASSANDRA-6275)
+ * Cancel read meter task when closing SSTR (CASSANDRA-6358)
+ * free off-heap IndexSummary during bulk (CASSANDRA-6359)
+ * Recover from IOException in accept() thread (CASSANDRA-6349)
+ * Improve Gossip tolerance of abnormally slow tasks (CASSANDRA-6338)
+ * Fix trying to hint timed out counter writes (CASSANDRA-6322)
+ * Allow restoring specific columnfamilies from archived CL (CASSANDRA-4809)
+ * Avoid flushing compaction_history after each operation (CASSANDRA-6287)
+ * Fix repair assertion error when tombstones expire (CASSANDRA-6277)
+ * Skip loading corrupt key cache (CASSANDRA-6260)
+ * Fixes for compacting larger-than-memory rows (CASSANDRA-6274)
+ * Compact hottest sstables first and optionally omit coldest from
+ compaction entirely (CASSANDRA-6109)
+ * Fix modifying column_metadata from thrift (CASSANDRA-6182)
+ * cqlsh: fix LIST USERS output (CASSANDRA-6242)
+ * Add IRequestSink interface (CASSANDRA-6248)
+ * Update memtable size while flushing (CASSANDRA-6249)
+ * Provide hooks around CQL2/CQL3 statement execution (CASSANDRA-6252)
+ * Require Permission.SELECT for CAS updates (CASSANDRA-6247)
+ * New CQL-aware SSTableWriter (CASSANDRA-5894)
+ * Reject CAS operation when the protocol v1 is used (CASSANDRA-6270)
+ * Correctly throw error when frame too large (CASSANDRA-5981)
+ * Fix serialization bug in PagedRange with 2ndary indexes (CASSANDRA-6299)
+ * Fix CQL3 table validation in Thrift (CASSANDRA-6140)
+ * Fix bug missing results with IN clauses (CASSANDRA-6327)
+ * Fix paging with reversed slices (CASSANDRA-6343)
+ * Set minTimestamp correctly to be able to drop expired sstables (CASSANDRA-6337)
+ * Support NaN and Infinity as float literals (CASSANDRA-6003)
+ * Remove RF from nodetool ring output (CASSANDRA-6289)
+ * Fix attempting to flush empty rows (CASSANDRA-6374)
+ * Fix potential out of bounds exception when paging (CASSANDRA-6333)
+Merged from 1.2:
+ * Optimize FD phi calculation (CASSANDRA-6386)
+ * Improve initial FD phi estimate when starting up (CASSANDRA-6385)
+ * Don't list CQL3 table in CLI describe even if named explicitely
+ (CASSANDRA-5750)
* Invalidate row cache when dropping CF (CASSANDRA-6351)
* add non-jamm path for cached statements (CASSANDRA-6293)
* (Hadoop) Require CFRR batchSize to be at least 2 (CASSANDRA-6114)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/3c15ff2e/src/java/org/apache/cassandra/db/Directories.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/3c15ff2e/test/unit/org/apache/cassandra/db/DirectoriesTest.java
----------------------------------------------------------------------