[ 
https://issues.apache.org/jira/browse/HBASE-21395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16665584#comment-16665584
 ] 

stack commented on HBASE-21395:
-------------------------------

Ran  mvn test -Dtest=TestMergeTableRegionsProcedure and got a nice message....



[ERROR] Failures:
[ERROR]   TestMergeTableRegionsProcedure.testMergeRegionsConcurrently:212 found 
exception: org.apache.hadoop.hbase.exceptions.MergeRegionException via 
master-merge-regions:org.apache.hadoop.hbase.exceptions.MergeRegionException: 
There is a table procedure going on against the same table, abort the merge of 
pid=48, state=RUNNABLE:MERGE_TABLE_REGIONS_PREPARE, locked=true; 
MergeTableRegionsProcedure table=testMergeRegionsConcurrently, 
regions=[3fffff957497f8b7b306120ca2c71fe1, 893d444596effc7aae69f8c1145500a0], 
forcibly=true
[ERROR]   TestMergeTableRegionsProcedure.testMergeTwoRegions:159 found 
exception: org.apache.hadoop.hbase.exceptions.MergeRegionException via 
master-merge-regions:org.apache.hadoop.hbase.exceptions.MergeRegionException: 
There is a table procedure going on against the same table, abort the merge of 
pid=36, state=RUNNABLE:MERGE_TABLE_REGIONS_PREPARE, locked=true; 
MergeTableRegionsProcedure table=testMergeTwoRegions, 
regions=[f5de4b3605e2aebdef0c8544d55abfb0, 67478c63bec10165fb383b8d35796a4a], 
forcibly=true
[ERROR]   TestMergeTableRegionsProcedure.testMergeWithoutPONR:295 expected a 
running proc
[ERROR]   TestMergeTableRegionsProcedure.testRecoveryAndDoubleExecution:242 
found exception: org.apache.hadoop.hbase.exceptions.MergeRegionException via 
master-merge-regions:org.apache.hadoop.hbase.exceptions.MergeRegionException: 
There is a table procedure going on against the same table, abort the merge of 
pid=61, state=RUNNABLE:MERGE_TABLE_REGIONS_PREPARE, locked=true; 
MergeTableRegionsProcedure table=testRecoveryAndDoubleExecution, 
regions=[0db36af05fe46aef3e32a810e90c51ab, fd4e09b1f961af7a9cf05a12a51ef23b], 
forcibly=false
[ERROR]   TestMergeTableRegionsProcedure.testRollbackAndDoubleExecution:269 
expected a running proc
[INFO]
[ERROR] Tests run: 5, Failures: 5, Errors: 0, Skipped: 0


Punting out to 2.1.2


> Abort split/merge procedure if there is a table procedure of the same table 
> going on
> ------------------------------------------------------------------------------------
>
>                 Key: HBASE-21395
>                 URL: https://issues.apache.org/jira/browse/HBASE-21395
>             Project: HBase
>          Issue Type: Sub-task
>    Affects Versions: 2.1.0, 2.0.2
>            Reporter: Allan Yang
>            Assignee: Allan Yang
>            Priority: Major
>             Fix For: 2.1.2
>
>         Attachments: HBASE-21395.branch-2.0.001.patch
>
>
> In my ITBLL, I often see that if split/merge procedure and table 
> procedure(like ModifyTableProcedure) happen at the same time, and since there 
> some race conditions between these two kind of procedures,  causing some 
> serious problems. e.g. the split/merged parent is bought on line by the table 
> procedure or the split merged region making the whole table procedure 
> rollback.
> Talked with [~Apache9] offline today, this kind of problem was solved in 
> branch-2+ since There is a fence that only one RTSP can agianst a single 
> region at the same time.
> To keep out of the mess in branch-2.0 and branch-2.1, I added a simple safe 
> fence in the split/merge procedure: If there is a table procedure going on 
> against the same table, then abort the split/merge procedure. Aborting the 
> split/merge procedure at the beginning of the execution is no big deal, 
> compared with the mess it will cause...



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to