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

OverseerAutoReplicaFailoverThread compares Integer objects using ==

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 4.10.3, 5.0
    • Fix Version/s: 5.1, 6.0
    • Component/s: SolrCloud
    • Labels:
      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

            • Assignee:
              shalinmangar Shalin Shekhar Mangar
              Reporter:
              shalinmangar Shalin Shekhar Mangar
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: