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

SplitTableRegionProcedure calls openParentRegions() at a wrong state during rollback.

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      Changed the issue title and description for the scope of the work. 

      there is a bug in handling Rollback in SplitTableRegionProcedure.

      https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java#L304

      https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java#L385

      In the state machine:
      
      
              case SPLIT_TABLE_REGION_CLOSE_PARENT_REGION:
                addChildProcedure(createUnassignProcedures(env));
                // Comments from HX:
                // createUnassignProcedures() can throw out IOException. If this happens,
                // it wont reach state SPLIT_TABLE_REGIONS_CHECK_CLOSED_REGION and no parent regions
                // is closed as all created UnassignProcedures are rolled back. If it rolls back with
                // state SPLIT_TABLE_REGION_CLOSE_PARENT_REGION, no need to call openParentRegion(),
                // otherwise, it will result in OpenRegionProcedure for an already open region.
                setNextState(SplitTableRegionState.SPLIT_TABLE_REGIONS_CHECK_CLOSED_REGIONS);
                break;
      
      
      In the rollback,
      
      
              case SPLIT_TABLE_REGIONS_CHECK_CLOSED_REGIONS:
                // Doing nothing, in SPLIT_TABLE_REGION_CLOSE_PARENT_REGION,
                // we will bring parent region online
                break;
              case SPLIT_TABLE_REGION_CLOSE_PARENT_REGION:
                // Comments from HX: 
                // OpenParentRegion() should not be called here as explained above.
                openParentRegion(env);
                break; 

      Attachments

        Issue Links

          Activity

            People

              huaxiangsun Huaxiang Sun
              huaxiangsun Huaxiang Sun
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: