Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-4514

A incorrect key object is used in SequenceManager#validateSequences

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 5.0.0-alpha, 4.14.0, 4.13.2-cdh
    • None
    • None

    Description

      nextSequences.get( i ) -> nextSequences.get( i ).getSequenceKey()

      SequenceManager.java
              for (int i = 0; i < nextSequences.size(); i++) {
                  sequencePosition[i] = sequenceMap.get(nextSequences.get(i)).getIndex();
              }
      

      It won't cause bug since the impl of SequenceAllocation#hashCode is equal with SequenceKey#hashCode. However, it still a potential bug so a fix is necessary I believe.

      SequenceAllocation.java
          @Override
          public int hashCode() {
              return sequenceKey.hashCode();
          }
      

      Attachments

        1. PHOENIX.4514.v0.patch
          1 kB
          Chia-Ping Tsai

        Activity

          People

            chia7712 Chia-Ping Tsai
            chia7712 Chia-Ping Tsai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: