You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2012/09/24 01:14:15 UTC

svn commit: r1389162 - in /lucene/dev/branches/lucene_solr_4_0: ./ solr/ solr/CHANGES.txt solr/core/ solr/core/src/java/org/apache/solr/update/PeerSync.java solr/test-framework/ solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java

Author: markrmiller
Date: Sun Sep 23 23:14:14 2012
New Revision: 1389162

URL: http://svn.apache.org/viewvc?rev=1389162&view=rev
Log:
SOLR-3869: A PeerSync attempt to it's replicas by a candidate leader should not fail on o.a.http.conn.ConnectTimeoutException.
Also turn on the use of jetty test mode with sys prop that was no longer being used - this improves the situation when we restart jetty. Both of these fixes should help our FreeBSD continuous build.

Modified:
    lucene/dev/branches/lucene_solr_4_0/   (props changed)
    lucene/dev/branches/lucene_solr_4_0/solr/   (props changed)
    lucene/dev/branches/lucene_solr_4_0/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/lucene_solr_4_0/solr/core/   (props changed)
    lucene/dev/branches/lucene_solr_4_0/solr/core/src/java/org/apache/solr/update/PeerSync.java
    lucene/dev/branches/lucene_solr_4_0/solr/test-framework/   (props changed)
    lucene/dev/branches/lucene_solr_4_0/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java

Modified: lucene/dev/branches/lucene_solr_4_0/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_0/solr/CHANGES.txt?rev=1389162&r1=1389161&r2=1389162&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_0/solr/CHANGES.txt (original)
+++ lucene/dev/branches/lucene_solr_4_0/solr/CHANGES.txt Sun Sep 23 23:14:14 2012
@@ -329,6 +329,9 @@ Bug Fixes
 
 * SOLR-3783: Fixed Pivot Faceting to work with facet.missing=true (hossman)
 
+* SOLR-3869: A PeerSync attempt to it's replicas by a candidate leader should
+  not fail on o.a.http.conn.ConnectTimeoutException. (Mark Miller)
+
 Other Changes
 ----------------------
 

Modified: lucene/dev/branches/lucene_solr_4_0/solr/core/src/java/org/apache/solr/update/PeerSync.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_0/solr/core/src/java/org/apache/solr/update/PeerSync.java?rev=1389162&r1=1389161&r2=1389162&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_0/solr/core/src/java/org/apache/solr/update/PeerSync.java (original)
+++ lucene/dev/branches/lucene_solr_4_0/solr/core/src/java/org/apache/solr/update/PeerSync.java Sun Sep 23 23:14:14 2012
@@ -28,6 +28,7 @@ import java.util.Set;
 
 import org.apache.http.NoHttpResponseException;
 import org.apache.http.client.HttpClient;
+import org.apache.http.conn.ConnectTimeoutException;
 import org.apache.lucene.util.BytesRef;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.impl.HttpClientUtil;
@@ -299,7 +300,7 @@ public class PeerSync  {
       if (cantReachIsSuccess && sreq.purpose == 1 && srsp.getException() instanceof SolrServerException) {
         Throwable solrException = ((SolrServerException) srsp.getException())
             .getRootCause();
-        if (solrException instanceof ConnectException
+        if (solrException instanceof ConnectException || solrException instanceof ConnectTimeoutException
             || solrException instanceof NoHttpResponseException) {
           log.warn(msg() + " couldn't connect to " + srsp.getShardAddress() + ", counting as success");
 

Modified: lucene/dev/branches/lucene_solr_4_0/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_0/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java?rev=1389162&r1=1389161&r2=1389162&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_0/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java (original)
+++ lucene/dev/branches/lucene_solr_4_0/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java Sun Sep 23 23:14:14 2012
@@ -81,6 +81,7 @@ public abstract class SolrTestCaseJ4 ext
   @BeforeClass 
   @SuppressWarnings("unused")
   private static void beforeClass() {
+    System.setProperty("jetty.testMode", "true");
     setupLogging();
     startTrackingSearchers();
     startTrackingZkClients();
@@ -95,6 +96,7 @@ public abstract class SolrTestCaseJ4 ext
     endTrackingSearchers();
     endTrackingZkClients();
     resetFactory();
+    System.clearProperty("jetty.testMode");
   }
 
   private static boolean changedFactory = false;