cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/3] git commit: change NBHS in ARR to CLQ patch by bes; reviewed by jbellis for CASSANDRA-7116
Date Wed, 30 Apr 2014 17:06:06 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 2269adba6 -> 74e96b460
  refs/heads/trunk d9f06a3be -> 8d993a476


change NBHS in ARR to CLQ
patch by bes; reviewed by jbellis for CASSANDRA-7116


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

Branch: refs/heads/cassandra-2.1
Commit: 74e96b460ae779e5823178108001871d4a10be7a
Parents: 2269adb
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Apr 30 11:46:51 2014 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed Apr 30 11:57:48 2014 -0500

----------------------------------------------------------------------
 .../org/apache/cassandra/service/AbstractRowResolver.java     | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/74e96b46/src/java/org/apache/cassandra/service/AbstractRowResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/AbstractRowResolver.java b/src/java/org/apache/cassandra/service/AbstractRowResolver.java
index 47a00da..1fbb92b 100644
--- a/src/java/org/apache/cassandra/service/AbstractRowResolver.java
+++ b/src/java/org/apache/cassandra/service/AbstractRowResolver.java
@@ -18,9 +18,9 @@
 package org.apache.cassandra.service;
 
 import java.nio.ByteBuffer;
-import java.util.Set;
+import java.util.Collection;
+import java.util.concurrent.ConcurrentLinkedQueue;
 
-import org.cliffc.high_scale_lib.NonBlockingHashSet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -34,7 +34,8 @@ public abstract class AbstractRowResolver implements IResponseResolver<ReadRespo
     protected static final Logger logger = LoggerFactory.getLogger(AbstractRowResolver.class);
 
     protected final String keyspaceName;
-    protected final Set<MessageIn<ReadResponse>> replies = new NonBlockingHashSet<MessageIn<ReadResponse>>();
+    // CLQ gives us thread-safety without the overhead of guaranteeing uniqueness like a
Set would
+    protected final Collection<MessageIn<ReadResponse>> replies = new ConcurrentLinkedQueue<>();
     protected final DecoratedKey key;
 
     public AbstractRowResolver(ByteBuffer key, String keyspaceName)


Mime
View raw message