Solr
  1. Solr
  2. SOLR-7145

Make SolrRequest parametrized by its response type

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1
    • Component/s: None
    • Labels:
      None

      Description

      We currently repeat a whole bunch of code in the process() method of every single SolrRequest-derived class. We should make SolrRequest parametrized by its response type, and consolidate into the base class.

      1. SOLR-7145.patch
        31 kB
        Alan Woodward
      2. SOLR-7145.patch
        59 kB
        Alan Woodward

        Activity

        Hide
        Alan Woodward added a comment -

        Patch.

        The biggest change is that QueryRequest.process() wasn't declared as throwing IOException, unlike all the other request types, and was re-packaging them as SolrExceptions. I think this is a bug, and it should - you should get a SolrServerException if there's an error on the server, and an IOException if there's a communication error.

        This is a backwards-breaking change, but I think it's an important one to make - swallowing IOExceptions is just wrong here, and none of the other request types do it.

        Show
        Alan Woodward added a comment - Patch. The biggest change is that QueryRequest.process() wasn't declared as throwing IOException, unlike all the other request types, and was re-packaging them as SolrExceptions. I think this is a bug, and it should - you should get a SolrServerException if there's an error on the server, and an IOException if there's a communication error. This is a backwards-breaking change, but I think it's an important one to make - swallowing IOExceptions is just wrong here, and none of the other request types do it.
        Hide
        Alan Woodward added a comment -

        New patch, removing the SolrClient API change, which I'll break into its own issue. I think this should be uncontroversial?

        Show
        Alan Woodward added a comment - New patch, removing the SolrClient API change, which I'll break into its own issue. I think this should be uncontroversial?
        Hide
        ASF subversion and git services added a comment -

        Commit 1662198 from Alan Woodward in branch 'dev/trunk'
        [ https://svn.apache.org/r1662198 ]

        SOLR-7145: SolrRequest is now parametrized by its response type

        Show
        ASF subversion and git services added a comment - Commit 1662198 from Alan Woodward in branch 'dev/trunk' [ https://svn.apache.org/r1662198 ] SOLR-7145 : SolrRequest is now parametrized by its response type
        Hide
        ASF subversion and git services added a comment -

        Commit 1662202 from Alan Woodward in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1662202 ]

        SOLR-7145: SolrRequest is now parametrized by its response type

        Show
        ASF subversion and git services added a comment - Commit 1662202 from Alan Woodward in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1662202 ] SOLR-7145 : SolrRequest is now parametrized by its response type
        Hide
        Timothy Potter added a comment -

        Bulk close after 5.1 release

        Show
        Timothy Potter added a comment - Bulk close after 5.1 release

          People

          • Assignee:
            Alan Woodward
            Reporter:
            Alan Woodward
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development