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

RequestHandlerBase.java:227 assertion failing: not all "Tragic" exceptions have 500 status, assert masks real failure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      RequestHandlerBase.java currently contains the following code added by SOLR-12477 ...

          } catch (Exception e) {
            if (req.getCore() != null) {
              boolean isTragic = req.getCore().getCoreContainer().checkTragicException(req.getCore());
              if (isTragic) {
                if (e instanceof SolrException) {
                  // Tragic exceptions should always throw a server error
                  assert ((SolrException) e).code() == 500;
                } else {
                  // wrap it in a solr exception
                  e = new SolrException(SolrException.ErrorCode.SERVER_ERROR, e.getMessage(), e);
                }
              }
            }
      

      ...however recent test failures have surfaced situations where this is evidnetly not true, and instead of the "original" error being returned to clients, the assertion fails, masking the "real" failure.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hossman Chris M. Hostetter
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: