Solr
  1. Solr
  2. SOLR-3869

A PeerSync attempt to it's replicas by a candidate leader should not fail on o.a.http.conn.ConnectTimeoutException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0, 6.0
    • Component/s: SolrCloud
    • Labels:
      None

      Description

      I'd like to fix this for 4 - it's a simple fix.

        Activity

        Hide
        Mark Miller added a comment -

        Committed.

        Show
        Mark Miller added a comment - Committed.
        Hide
        Mark Miller added a comment -
        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");
        Show
        Mark Miller added a comment - 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" );
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] Mark Robert Miller
        http://svn.apache.org/viewvc?view=revision&revision=1389161

        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.

        Show
        Commit Tag Bot added a comment - [branch_4x commit] Mark Robert Miller http://svn.apache.org/viewvc?view=revision&revision=1389161 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.
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] Mark Robert Miller
        http://svn.apache.org/viewvc?view=revision&revision=1389161

        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.

        Show
        Commit Tag Bot added a comment - [branch_4x commit] Mark Robert Miller http://svn.apache.org/viewvc?view=revision&revision=1389161 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.
        Hide
        Uwe Schindler added a comment -

        Closed after release.

        Show
        Uwe Schindler added a comment - Closed after release.

          People

          • Assignee:
            Mark Miller
            Reporter:
            Mark Miller
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development