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

Can not locate region after split and merge

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: Region Assignment
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      Now if we hit a split parent when locating a region, we will skip to the next row and try again until the region does not contain our row. So there will be no RegionOfflineException for a split parent any more, instead, if the split children have not been onlined yet, i.e, we finally arrive at a region which does not contain our row, an IOException will be thrown.
      Show
      Now if we hit a split parent when locating a region, we will skip to the next row and try again until the region does not contain our row. So there will be no RegionOfflineException for a split parent any more, instead, if the split children have not been onlined yet, i.e, we finally arrive at a region which does not contain our row, an IOException will be thrown.

      Description

      When implementing serial replication feature in HBASE-20046, I found that when splitting a region, we will not remove the parent region, instead we will mark it offline.

      And when locating a region, we will only scan one row so if we locate to the offlined region then we are dead.

      This will not happen for splitting, since one of the new daughter regions have the same start row with the parent region, and the timestamp is greater so when doing reverse scan we will always hit the daughter first.

      But if we also consider merge then bad things happen. Consider we have two regions A and B, we split B to C and D, and then merge A and C to E, then ideally the regions should be E and D, but actually the regions in meta will be E, B and D, and they all have different start rows. If you use a row within the range of old region C, then we will always locate to B and throw exception.

        Attachments

        1. HBASE-20182-UT.patch
          4 kB
          Duo Zhang
        2. HBASE-20182.patch
          20 kB
          Duo Zhang
        3. HBASE-20182-v1.patch
          22 kB
          Duo Zhang
        4. HBASE-20182-v2.patch
          22 kB
          Duo Zhang
        5. HBASE-20182-v3.patch
          26 kB
          Duo Zhang
        6. HBASE-20182-v3.patch
          26 kB
          Ted Yu
        7. HBASE-20182-v3.patch
          26 kB
          Duo Zhang
        8. HBASE-20182-addendum.patch
          5 kB
          Duo Zhang

          Issue Links

            Activity

              People

              • Assignee:
                zhangduo Duo Zhang
                Reporter:
                zhangduo Duo Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: