mirror of https://github.com/apache/lucene.git
SOLR-6521 use abs() to handle -ve hash
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1653921 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
77982fb4e3
commit
8c7f42d6f8
|
@ -1089,7 +1089,7 @@ public class CloudSolrClient extends SolrClient {
|
|||
return ref.get();
|
||||
}
|
||||
List locks = this.locks;
|
||||
final Object lock = locks.get(Hash.murmurhash3_x86_32(collection, 0, collection.length(), 0) % locks.size());
|
||||
final Object lock = locks.get(Math.abs(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);
|
||||
|
|
Loading…
Reference in New Issue