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

Harden hbase region inconsistencies check in CQSI#getAllTableRegions method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 5.2.0, 5.1.4
    • core
    • None

    Description

      Encountered an issue in production cluster where the region inconsistency check didn't catch region hole and full region overlaps and the range scan query returned incorrect results (result were out of range). We were running hbck repair operation exactly at the same time the query was running.

      This is the check here but this will check whether current regions end key is greater than previous region's end key.

              if (Bytes.compareTo(regionLocation.getRegionInfo().getEndKey(), currentKey) <= 0
                      && !Bytes.equals(currentKey, HConstants.EMPTY_START_ROW)
                      && !Bytes.equals(regionLocation.getRegionInfo().getEndKey(), HConstants.EMPTY_END_ROW)) {
                  GLOBAL_HBASE_COUNTER_METADATA_INCONSISTENCY.increment();
                  String regionNameString =
                          new String(regionLocation.getRegionInfo().getRegionName(), StandardCharsets.UTF_8);
                  throw new IOException(String.format(
                          "HBase region information overlap/inconsistencies on region %s", regionNameString));
              }
      

      The above check will NOT check if there are any region holes and full region overlaps.

      Attachments

        Issue Links

          Activity

            People

              divneet18 Divneet Kaur
              shahrs87 Rushabh Shah
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: