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

SolrJ - autodetect xml/javabin transport requirements

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.3
    • 4.9, 6.0
    • clients - java, SolrJ
    • None

    Description

      The idea here is to support automatically detecting whether a target Solr server will work with the binary request writer and/or response parser, then use that information to pick the most efficient combination. See discussion on SOLR-3038.

      This issue concerns itself with 4.x clients, which as of 4.3.1, send XML requests and ask for a binary response. SOLR-3038 aims to change the default for requests to binary. That change would break default compatibility with 3.x servers, requiring an explicit change to the XML request writer.

      This issue is designed to fill the gap if/when the default request writer is changed, to allow the server object to detect when it needs to change request writers and response parsers.

      I see four possible approaches:

      1) Run detection when the object is created. IMHO, this is a bad idea.
      2) Require an explicit call to an autodetect method.
      3) Run the detection mechanism the first time a request is processed. If adjustment is deemed necessary, adjust the transports and log a warning, and possibly even include that warning in the response object.
      4) Don't actually autodetect. The FIRST time a request fails, try downgrading the transport. If the request writer isn't already XML, change it, log a warning, and try the request again. Repeat for the response parser. If the change works, keep going with the new settings. If not, undo the changes and throw the usual exception, including a note saying that downgrading to XML was attempted.

      Attachments

        1. SOLR-4820.patch
          3 kB
          Shawn Heisey

        Issue Links

          Activity

            People

              elyograg Shawn Heisey
              elyograg Shawn Heisey
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: