[ 
https://issues.apache.org/jira/browse/HBASE-29315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang resolved HBASE-29315.
-------------------------------
    Fix Version/s: 2.7.0
                   3.0.0-beta-2
                   2.6.3
                   2.5.12
     Hadoop Flags: Reviewed
       Resolution: Fixed

Pushed to all active branches.

Thanks [~charlesconnell]!

> Cancel Split/MergeTableRegionProcedure if table modification is in progress
> ---------------------------------------------------------------------------
>
>                 Key: HBASE-29315
>                 URL: https://issues.apache.org/jira/browse/HBASE-29315
>             Project: HBase
>          Issue Type: Bug
>          Components: proc-v2
>            Reporter: Charles Connell
>            Assignee: Charles Connell
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 2.7.0, 3.0.0-beta-2, 2.6.3, 2.5.12
>
>
> When adding new replicas, ModifyTableProcedure roughly does the following:
>  # Edits the table descriptor
>  # Closes and opens all existing regions
>  # Creates replication peer to support the new replica regions
>  # Opens new replica regions
> When closing a region in step 2, the act of closing it can trigger a split. 
> When the HMaster runs the SplitTableRegionProcedure, it roughly does:
>  # Close the region to be split
>  # Split the store files
>  # Open the new daughter regions (including replicas)
> When a split is done as part of a ModifyTableProcedure that adds replicas, we 
> get the following combination of behavior:
>  # Edit the table descriptor
>  # Close and open all existing regions, adding a SplitTableRegionProcedure to 
> the HMaster's queue
>  # To begin the SplitTableRegionProcedure, close region to be split
>  # Split store files
>  # Open the new daughter regions, including replicas, completing the 
> SplitTableRegionProcedure
>  # Create replication peer to support the new replica regions
>  # Open new replica regions, even though some were already opened in step 5. 
> Double-opening doesn't work, and the open procedures get stuck.
> -There are a few ways to correct this problem, but perhaps the most intuitive 
> way is to use the existing lock mechanisms in the procedure system. The 
> ModifyTableProcedure can lock the table from beginning to end, allowing only 
> itself and its child procedures to modify the table. This would enforce in 
> code what is already an implicit assumption in the implementation of the 
> procedure – that nobody else open regions while it's running.-
> Discussed over 
> [email|https://lists.apache.org/thread/0x4pxr5jt8cwprq6xhxr6d5g3lctlhhc].



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to