Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-7226

HRegion.checkAndMutate uses incorrect comparison result for <, <=, > and >=

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      in HRegion.checkAndMutate, incorrect comparison results are used for <, <=, > and >=, as below:

      switch (compareOp) {
      case LESS:
      matches = compareResult <= 0; // should be '<' here
      break;
      case LESS_OR_EQUAL:
      matches = compareResult < 0; // should be '<=' here
      break;
      case EQUAL:
      matches = compareResult == 0;
      break;
      case NOT_EQUAL:
      matches = compareResult != 0;
      break;
      case GREATER_OR_EQUAL:
      matches = compareResult > 0; // should be '>=' here
      break;
      case GREATER:
      matches = compareResult >= 0; // should be '>' here
      break;

      Attachments

        1. HBASE-7226-trunk.patch
          6 kB
          Honghua Feng
        2. HBASE-7226-trunk-v2.patch
          6 kB
          Honghua Feng
        3. HRegion_HBASE_7226_0.94.2.patch
          1 kB
          Honghua Feng

        Activity

          People

            fenghh Honghua Feng
            fenghh Honghua Feng
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: