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

totally bogus and missleading "no default request handler is registered" logged by RequestHandlers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.1
    • 5.4, 6.0
    • None
    • None

    Description

      As noted on the user list by Scott Hollenbeck the following warning can be logged by solr...

      no default request handler is registered (either '/select' or 'standard')

      ...even if there is both a handler named "standard" and a handler (in his case named "pinkPony") defined as default="true".

      The code in question appears to be total nonsense...

          if(!handlers.alias( "/select","")){
            if(!handlers.alias( "standard","")){
              log.warn("no default request handler is registered (either '/select' or 'standard')");
            }
          }
      
      • PluginBag.alias is not documented, but appears to be a mutating operation that adds an alias if and only if the first arg is aname of something that exists, and the second arg is a name that does not already exist – returning true if the alias is added
      • if an alias already exists with the (default) name "" (which initHandlersFromConfig takes care of registring before this code) then neither of these can be made the new default.
      • just because neither of these aren't made the default here, doesn't mean there isn't already a default handler – it actually means the exact oposite
      • if the goal was to log an error when there is no default, then that should have just been checked directly

      Attachments

        1. SOLR-7988.patch
          1 kB
          Noble Paul

        Activity

          People

            noble.paul Noble Paul
            hossman Chris M. Hostetter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: