Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-14317

HttpClusterStateProvider throws exception when only one node down

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 7.7.1, 7.7.2
    • 8.6
    • SolrJ
    • None

    Description

      When create a CloudSolrClient with solrUrls, if the first url in the solrUrls list is invalid or server is down, it will throw exception directly rather than try remaining url.

      In https://github.com/apache/lucene-solr/blob/branch_7_7/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClusterStateProvider.java#L65, if fetchLiveNodes(initialClient) have any IOException, in https://github.com/apache/lucene-solr/blob/branch_7_7/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java#L648, exceptions will be caught and throw SolrServerException to the upper caller, while no IOExceptioin will be caught in HttpClusterStateProvider.fetchLiveNodes(HttpClusterStateProvider.java:200).

      The SolrServerException should be caught as well in https://github.com/apache/lucene-solr/blob/branch_7_7/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClusterStateProvider.java#L69, so that if first node provided in solrUrs down, we can try to use the second to fetch live nodes.

       

       

      Attachments

        1. SOLR-14317.patch
          2 kB
          Lyle
        2. SOLR-14317.patch
          2 kB
          Lyle

        Issue Links

          Activity

            People

              ichattopadhyaya Ishan Chattopadhyaya
              lyle_wang Lyle
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m