You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2015/01/22 15:04:11 UTC
svn commit: r1653864 - in /lucene/dev/branches/branch_5x: ./ solr/
solr/solrj/
solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
Author: noble
Date: Thu Jan 22 14:04:10 2015
New Revision: 1653864
URL: http://svn.apache.org/r1653864
Log:
SOLR-6521 use murmurhash because hashCode can give -ve val
Modified:
lucene/dev/branches/branch_5x/ (props changed)
lucene/dev/branches/branch_5x/solr/ (props changed)
lucene/dev/branches/branch_5x/solr/solrj/ (props changed)
lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
Modified: lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java?rev=1653864&r1=1653863&r2=1653864&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java (original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java Thu Jan 22 14:04:10 2015
@@ -46,6 +46,7 @@ import org.apache.solr.common.params.Mod
import org.apache.solr.common.params.ShardParams;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.params.UpdateParams;
+import org.apache.solr.common.util.Hash;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.SolrjNamedThreadFactory;
import org.apache.solr.common.util.StrUtils;
@@ -1088,7 +1089,7 @@ public class CloudSolrClient extends Sol
return ref.get();
}
List locks = this.locks;
- final Object lock = locks.get(collection.hashCode() % locks.size());
+ final Object lock = locks.get(Hash.murmurhash3_x86_32(collection, 0, collection.length(), 0) % locks.size());
synchronized (lock){
//we have waited for sometime just check once again
col = getFromCache(collection);