Solr
  1. Solr
  2. SOLR-7178

OverseerAutoReplicaFailoverThread compares Integer objects using ==

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial 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.

        Activity

        Hide
        ASF subversion and git services added a comment -

        Commit 1662935 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1662935 ]

        SOLR-7178: OverseerAutoReplicaFailoverThread compares Integer objects using ==

        Show
        ASF subversion and git services added a comment - Commit 1662935 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1662935 ] SOLR-7178 : OverseerAutoReplicaFailoverThread compares Integer objects using ==
        Hide
        ASF subversion and git services added a comment -

        Commit 1662936 from shalin@apache.org in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1662936 ]

        SOLR-7178: OverseerAutoReplicaFailoverThread compares Integer objects using ==

        Show
        ASF subversion and git services added a comment - Commit 1662936 from shalin@apache.org in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1662936 ] SOLR-7178 : OverseerAutoReplicaFailoverThread compares Integer objects using ==
        Hide
        Timothy Potter added a comment -

        Bulk close after 5.1 release

        Show
        Timothy Potter added a comment - Bulk close after 5.1 release

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development