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

Fix "Search is temporarily disabled" logic to be consistent for entire request

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 8.2, 9.0
    • None
    • None

    Description

      Where/How the "Search is temporarily disabled" logic was added in SOLR-12999 can result in some weird failure cases (examples: SOLR-13470 & SOLR-13471) due to the fact that  (as currently implemented) some portions of processing a SolrQueryRequest may see a valid searcher, but later other code paths will get an error when trying to use the same searcher.

      I think it would make more sense to move the "searchEnabled" logic out of SolrQueryRequestbase.getSearcher() and into SolrCore.getSearcher() (removing the need for SolrCore.isSearchEnabled() ).

      This will:

      • restore the long standing (and widly assumed by code) behavior of SolrQueryRequestbase.getSearcher() that it will always return a consistent result
      • ensure that any custom plugins trying to call SolrCore.getSearcher() directly will also get the benefits of the safety checks introduced in SOLR-12999

      Attachments

        1. SOLR-13474.patch
          4 kB
          Chris M. Hostetter
        2. SOLR-13474.patch
          4 kB
          Chris M. Hostetter

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment