Lucene - Core
  1. Lucene - Core
  2. LUCENE-5600

HttpReplicator does not properly handle server failures

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.7.1
    • Fix Version/s: 4.8.1, 4.9, 6.0
    • Component/s: modules/replicator
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      When ReplicationClient.updateNow() using an HttpReplicator encounters a server error (like Status Code 500), it throws a runtime exception instead of an IOException.
      Furthermore, it does not close the HttpClient it used, which leads to an Error if a BasicClientConnectionManager is used

      1. HttpClientBase-LUCENE-5600.java.patch
        2 kB
        Christoph Kaser
      2. HttpReplicatorTest.patch
        4 kB
        Christoph Kaser
      3. LUCENE-5600.patch
        9 kB
        Shai Erera

        Activity

        Hide
        Christoph Kaser added a comment -

        Test

        Show
        Christoph Kaser added a comment - Test
        Hide
        Christoph Kaser added a comment -

        Fix

        Show
        Christoph Kaser added a comment - Fix
        Hide
        Shai Erera added a comment -

        I applied the patch, cleaned up few things and added CHANGES. I didn't apply the part which guarantees to throw IOException always, we should be prepared to handle RuntimeExceptions and Errors too. I think it's ready, but will wait some before commit.

        Show
        Shai Erera added a comment - I applied the patch, cleaned up few things and added CHANGES. I didn't apply the part which guarantees to throw IOException always, we should be prepared to handle RuntimeExceptions and Errors too. I think it's ready, but will wait some before commit.
        Hide
        ASF subversion and git services added a comment -

        Commit 1588296 from shaie@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1588296 ]

        LUCENE-5600: HttpReplicator does not properly handle server failures

        Show
        ASF subversion and git services added a comment - Commit 1588296 from shaie@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1588296 ] LUCENE-5600 : HttpReplicator does not properly handle server failures
        Hide
        ASF subversion and git services added a comment -

        Commit 1588297 from shaie@apache.org in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1588297 ]

        LUCENE-5600: HttpReplicator does not properly handle server failures

        Show
        ASF subversion and git services added a comment - Commit 1588297 from shaie@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1588297 ] LUCENE-5600 : HttpReplicator does not properly handle server failures
        Hide
        Shai Erera added a comment -

        Committed to trunk and 4x. Thanks Christoph!

        Show
        Shai Erera added a comment - Committed to trunk and 4x. Thanks Christoph!
        Hide
        ASF subversion and git services added a comment -

        Commit 1592584 from Michael McCandless in branch 'dev/branches/lucene_solr_4_8'
        [ https://svn.apache.org/r1592584 ]

        LUCENE-5599, LUCENE-5600, LUCENE-5628: backport to 4.8.x

        Show
        ASF subversion and git services added a comment - Commit 1592584 from Michael McCandless in branch 'dev/branches/lucene_solr_4_8' [ https://svn.apache.org/r1592584 ] LUCENE-5599 , LUCENE-5600 , LUCENE-5628 : backport to 4.8.x

          People

          • Assignee:
            Shai Erera
            Reporter:
            Christoph Kaser
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development