lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r1662427 - in /lucene/dev/branches/lucene_solr_4_10: ./ solr/ solr/CHANGES.txt solr/solrj/ solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java
Date Thu, 26 Feb 2015 11:54:17 GMT
Author: shalin
Date: Thu Feb 26 11:54:17 2015
New Revision: 1662427

URL: http://svn.apache.org/r1662427
Log:
SOLR-6457: LBHttpSolrClient: ArrayIndexOutOfBoundsException risk if counter overflows

Modified:
    lucene/dev/branches/lucene_solr_4_10/   (props changed)
    lucene/dev/branches/lucene_solr_4_10/solr/   (props changed)
    lucene/dev/branches/lucene_solr_4_10/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/lucene_solr_4_10/solr/solrj/   (props changed)
    lucene/dev/branches/lucene_solr_4_10/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java

Modified: lucene/dev/branches/lucene_solr_4_10/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_10/solr/CHANGES.txt?rev=1662427&r1=1662426&r2=1662427&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_10/solr/CHANGES.txt (original)
+++ lucene/dev/branches/lucene_solr_4_10/solr/CHANGES.txt Thu Feb 26 11:54:17 2015
@@ -37,6 +37,8 @@ Bug Fixes
 
 * SOLR-6426: SolrZkClient clean can fail due to a race with children nodes. (Mark Miller)
 
+* SOLR-6457: LBHttpSolrClient: ArrayIndexOutOfBoundsException risk if counter overflows
+  (longkey via Noble Paul)
 
 
 ==================  4.10.3 ==================

Modified: lucene/dev/branches/lucene_solr_4_10/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_10/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java?rev=1662427&r1=1662426&r2=1662427&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_10/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java
(original)
+++ lucene/dev/branches/lucene_solr_4_10/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java
Thu Feb 26 11:54:17 2015
@@ -475,7 +475,7 @@ public class LBHttpSolrServer extends So
     Map<String,ServerWrapper> justFailed = null;
 
     for (int attempts=0; attempts<maxTries; attempts++) {
-      int count = counter.incrementAndGet();      
+      int count = counter.incrementAndGet() & Integer.MAX_VALUE;
       ServerWrapper wrapper = serverList[count % serverList.length];
       wrapper.lastUsed = System.currentTimeMillis();
 



Mime
View raw message