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:
Noble Paul 2015-01-22 15:55:21 +00:00
parent 77982fb4e3
commit 8c7f42d6f8
1 changed files with 1 additions and 1 deletions

View File

@ -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);