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

Add "tolerant" switches to configure behaviour when a component throws an exception

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Was: "An Exception in a non-query component should not cause a global HTTP 500 Server Error response" on the dev list.

      The current behavior of Solr on any component throwing an error is to send a response containing the results of the components that did succeed with a HTTP status code of 500 Server Error.

      I propose to implement switches similar to the "shards.tolerant" ones that would allow Solr to return the response without the 500 HTTP status.

      A global switch might be useful to ask Solr to return only the 500 HTTP status and the exception details without the rest of the response, but otherwise I believe the switches should be per component since only at that level can be decided what the impact might be.

      E.g. for the highlight component, the switch could be
      "component.highlight.tolerant=true" to cause it to ignore (but still log!) InvalidTokenOffsetsExceptions and either return the rest of the results or return no results at all.

      The response format could be extended too to allow more than one exception to be included (per component or simply a list?) without necessarily changing the HTTP status to 500.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lvl Luc Vanlerberghe
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: