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

OverseerAutoReplicaFailoverThread compares Integer objects using ==

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 4.10.3, 5.0
    • 5.1, 6.0
    • SolrCloud
    • None

    Description

      As noted on SOLR-6923, OverseerAutoReplicaFailoverThread has:

      if (lastClusterStateVersion == clusterState.getZkClusterStateVersion() && baseUrlForBadNodes.size() == 0 &&
                liveNodes.equals(clusterState.getLiveNodes())) {
      ...
      }
      

      According to JLS this is guaranteed to work only when the integers are between -128 and 127.

      Attachments

        Activity

          People

            shalin Shalin Shekhar Mangar
            shalin Shalin Shekhar Mangar
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: