HBase
  1. HBase
  2. HBASE-4800

Result.compareResults is incorrect

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.90.4, 0.92.0, 0.94.0
    • Fix Version/s: 0.90.5
    • Component/s: Client
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      A coworker of mine (James Taylor) found a bug in Result.compareResults(...).
      This condition:

            if (!ourKVs[i].equals(replicatedKVs[i]) &&
                !Bytes.equals(ourKVs[i].getValue(), replicatedKVs[i].getValue())) {
              throw new Exception("This result was different: "
      

      should be

            if (!ourKVs[i].equals(replicatedKVs[i]) ||
                !Bytes.equals(ourKVs[i].getValue(), replicatedKVs[i].getValue())) {
              throw new Exception("This result was different: "
      

      Just checked, this is wrong in all branches.

      1. 4800.txt
        2 kB
        Lars Hofhansl

        Activity

        Hide
        Hudson added a comment -

        Integrated in HBase-0.92 #137 (See https://builds.apache.org/job/HBase-0.92/137/)
        HBASE-4800 Result.compareResults is incorrect (James Taylor and Lars H)

        larsh :
        Files :

        • /hbase/branches/0.92/CHANGES.txt
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/Result.java
        • /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/client/TestResult.java
        Show
        Hudson added a comment - Integrated in HBase-0.92 #137 (See https://builds.apache.org/job/HBase-0.92/137/ ) HBASE-4800 Result.compareResults is incorrect (James Taylor and Lars H) larsh : Files : /hbase/branches/0.92/CHANGES.txt /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/Result.java /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/client/TestResult.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #2448 (See https://builds.apache.org/job/HBase-TRUNK/2448/)
        HBASE-4800 Result.compareResults is incorrect (James Taylor and Lars H)

        larsh :
        Files :

        • /hbase/trunk/CHANGES.txt
        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/Result.java
        • /hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestResult.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #2448 (See https://builds.apache.org/job/HBase-TRUNK/2448/ ) HBASE-4800 Result.compareResults is incorrect (James Taylor and Lars H) larsh : Files : /hbase/trunk/CHANGES.txt /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/Result.java /hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestResult.java
        Hide
        Lars Hofhansl added a comment -

        Committed to 0.90, 0.92, and trunk.

        Show
        Lars Hofhansl added a comment - Committed to 0.90, 0.92, and trunk.
        Hide
        stack added a comment -

        +1

        Show
        stack added a comment - +1
        Hide
        Lars Hofhansl added a comment -

        Simple patch with test

        Show
        Lars Hofhansl added a comment - Simple patch with test

          People

          • Assignee:
            Lars Hofhansl
            Reporter:
            Lars Hofhansl
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development