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

ClusterStatus should not spew an exception trace if it gets an alias name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 7.5
    • 7.6, 8.0
    • SolrCloud
    • None

    Description

      This has been a lingering irritant in debugging tests for time routed aliases, previously mentioned in SOLR-11949 and can be seen frequently in logs attached to SOLR-12928. Basically what happens is for one reason or another cluster status is called on an alias rather than a collection and this is treated identically to a collection name that doesn't exist. 

      This also has lead this bit of lovely exception message parsing in HttpClusteStateProvider.java

            } catch (SolrServerException | RemoteSolrException | IOException e) {
              if (e.getMessage().contains(collection + " not found")) {
                // Cluster state for the given collection was not found.
                // Lets fetch/update our aliases:
                getAliases(true);
                return null;
              }
              log.warn("Attempt to fetch cluster state from " +
                  Utils.getBaseUrlForNodeName(nodeName, urlScheme) + " failed.", e);
            }
      

      Cluster status is already handled in the case of no collection name provided by returning status on all collections. It would make more sense if this command returned status on the component collections for the alias.

      If that turns out to be difficult or cause too many problems this should at least be downgraded to a non-stack trace warning message since this situation does not represent a failure of the system. The error/stack should of course be retained if neither a collection nor an alias exist.

      Attachments

        1. SOLR-12938.patch
          9 kB
          Gus Heck
        2. SOLR-12938.patch
          10 kB
          Gus Heck
        3. SOLR-12938.patch
          10 kB
          Gus Heck

        Activity

          People

            gus Gus Heck
            gus Gus Heck
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: