Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-20828 Finish-up AMv2 Design/List of Tenets/Specification of operation
  3. HBASE-20881

Introduce a region transition procedure to handle all the state transition for a region

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0, 2.2.0
    • Component/s: amv2, proc-v2
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      Hide
      Introduced a new TransitRegionStateProcedure to replace the old AssignProcedure/UnassignProcedure/MoveRegionProcedure. In the old code, MRP will not be attached to RegionStateNode, so it can not be interrupted by ServerCrashProcedure, which introduces lots of tricky code to deal with races, and also causes lots of other difficulties on how to prevent scheduling redundant or even conflict procedures for a region.

      And now TRSP is the only one procedure which can bring region online or offline. When you want to schedule one, you need to check whether there is already one attached to the RegionStateNode, under the lock of the RegionStateNode. If not just go ahead, and if there is one, then you should do something, for example, give up and fail directly, or tell the TRSP to give up(This is what SCP does). Since the check and attach are both under the lock of RSN, it will greatly reduce the possible races, and make the code much simpler.
      Show
      Introduced a new TransitRegionStateProcedure to replace the old AssignProcedure/UnassignProcedure/MoveRegionProcedure. In the old code, MRP will not be attached to RegionStateNode, so it can not be interrupted by ServerCrashProcedure, which introduces lots of tricky code to deal with races, and also causes lots of other difficulties on how to prevent scheduling redundant or even conflict procedures for a region. And now TRSP is the only one procedure which can bring region online or offline. When you want to schedule one, you need to check whether there is already one attached to the RegionStateNode, under the lock of the RegionStateNode. If not just go ahead, and if there is one, then you should do something, for example, give up and fail directly, or tell the TRSP to give up(This is what SCP does). Since the check and attach are both under the lock of RSN, it will greatly reduce the possible races, and make the code much simpler.

      Description

      Now have an AssignProcedure, an UnssignProcedure, and also a MoveRegionProcedure which schedules an AssignProcedure and an UnssignProcedure to move a region. This makes the logic a bit complicated, as MRP is not a RIT, so when SCP can not interrupt it directly...

        Attachments

        1. HBASE-20881-branch-2-v2.patch
          494 kB
          Duo Zhang
        2. HBASE-20881-branch-2-v1.patch
          493 kB
          Duo Zhang
        3. HBASE-20881-branch-2.patch
          494 kB
          Duo Zhang
        4. HBASE-20881-v16.patch
          483 kB
          Duo Zhang
        5. HBASE-20881-v15.patch
          483 kB
          Duo Zhang
        6. HBASE-20881-v14.patch
          482 kB
          Duo Zhang
        7. HBASE-20881-v14.patch
          482 kB
          Duo Zhang
        8. HBASE-20881-v13.patch
          475 kB
          Duo Zhang
        9. HBASE-20881-v13.patch
          475 kB
          Duo Zhang
        10. HBASE-20881-v12.patch
          475 kB
          Duo Zhang
        11. HBASE-20881-v11.patch
          474 kB
          Duo Zhang
        12. HBASE-20881-v10.patch
          465 kB
          Duo Zhang
        13. HBASE-20881-v9.patch
          448 kB
          Duo Zhang
        14. HBASE-20881-v8.patch
          444 kB
          Duo Zhang
        15. HBASE-20881-v7.patch
          433 kB
          Duo Zhang
        16. HBASE-20881-v7.patch
          433 kB
          Duo Zhang
        17. HBASE-20881-v6.patch
          433 kB
          Duo Zhang
        18. HBASE-20881-v5.patch
          420 kB
          Duo Zhang
        19. HBASE-20881-v4.patch
          359 kB
          Duo Zhang
        20. HBASE-20881-v4.patch
          359 kB
          Duo Zhang
        21. HBASE-20881-v3.patch
          358 kB
          Duo Zhang
        22. HBASE-20881-v2.patch
          355 kB
          Duo Zhang
        23. HBASE-20881-v1.patch
          329 kB
          Duo Zhang
        24. HBASE-20881.patch
          289 kB
          Duo Zhang

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: