Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix thread safety of CommitLog.tablesRecovered

patch by jbellis; reviewed by rbranson for CASSANDRA-3751
  • Loading branch information...
commit 359391fa835bb4eeba662f8155159c18e919b40e 1 parent dbd8ced
@jbellis jbellis authored
View
2  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)
View
3  src/java/org/apache/cassandra/db/commitlog/CommitLog.java
@@ -48,6 +48,7 @@
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 boolean accept(File dir, String name)
// 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>();
Please sign in to comment.
Something went wrong with that request. Please try again.