cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [7/16] git commit: fix thread safety of CommitLog.tablesRecovered patch by jbellis; reviewed by rbranson for CASSANDRA-3751
Date Wed, 01 Feb 2012 19:27:07 GMT
fix thread safety of CommitLog.tablesRecovered
patch by jbellis; reviewed by rbranson for CASSANDRA-3751


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

Branch: refs/heads/trunk
Commit: 359391fa835bb4eeba662f8155159c18e919b40e
Parents: dbd8ced
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Feb 1 13:10:01 2012 -0600
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed Feb 1 13:10:01 2012 -0600

----------------------------------------------------------------------
 CHANGES.txt                                        |    2 ++
 .../apache/cassandra/db/commitlog/CommitLog.java   |    3 ++-
 2 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/359391fa/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index a6a724f..513d0ab 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 0.8.10
+ * fix thread safety issues in commitlog replay, primarily affecting
+   systems with many (100s) of CF definitions (CASSANDRA-3751)
  * prevent new nodes from thinking down nodes are up forever (CASSANDRA-3626)
  * use correct list of replicas for LOCAL_QUORUM reads when read repair
    is disabled (CASSANDRA-3696)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/359391fa/src/java/org/apache/cassandra/db/commitlog/CommitLog.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLog.java b/src/java/org/apache/cassandra/db/commitlog/CommitLog.java
index a5e52c8..ba1ebf0 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLog.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLog.java
@@ -48,6 +48,7 @@ import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.WrappedRunnable;
+import org.cliffc.high_scale_lib.NonBlockingHashSet;
 
 /*
  * Commit Log tracks every write operation into the system. The aim
@@ -170,7 +171,7 @@ public class CommitLog
     // returns the number of replayed mutation (useful for tests in particular)
     public static int recover(File[] clogs) throws IOException
     {
-        final Set<Table> tablesRecovered = new HashSet<Table>();
+        final Set<Table> tablesRecovered = new NonBlockingHashSet<Table>();
         List<Future<?>> futures = new ArrayList<Future<?>>();
         byte[] bytes = new byte[4096];
         Map<Integer, AtomicInteger> invalidMutations = new HashMap<Integer, AtomicInteger>();


Mime
View raw message