[
https://issues.apache.org/jira/browse/HBASE-22631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16907977#comment-16907977
]
Wellington Chevreuil commented on HBASE-22631:
----------------------------------------------
Hi [~yu-huiyang], thanks for reviewing on this. I still think the cause is more
likely to be some meta inconsistency, had shared some thoughts below:
{quote}But server tempt20 also contains the region in serverMap when
unassignedprocedure(pid=3) finished . Because tempt20 tried to open this region
in pid=1 and serverMap failed to remove this region from tempt20 according to
serverMap.
{quote}
That's not my understanding. Here's a short code walkthrough:
* Once the AP for this region on tempt20 failed, it will go through
_AssignProcedure.handleFailure_.
* There, it calls _AssignmentManager.undeRegionAsOpening_, which effectively
removes the region from this Server entry in _serverMap_ by calling
_RegionStates.removeFromRegionServer_. [Here the specific point where the
region gets removed from
_serverMap_|https://github.com/apache/hbase/blob/branch-2.1/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java#L1168].
Would you think this scenario had deviated from the flow I had described above
(have you seen any log errors suggesting the AP failed to handle the assignment
failure)? I may try later to write a UT to simulate this condition.
> assign failed may make gced parent region appear again !!!
> ----------------------------------------------------------
>
> Key: HBASE-22631
> URL: https://issues.apache.org/jira/browse/HBASE-22631
> Project: HBase
> Issue Type: Bug
> Components: proc-v2
> Affects Versions: 2.1.1
> Reporter: yuhuiyang
> Priority: Major
> Attachments: HBASE-22631-branch-2.1-01.patch, assign.png,
> assignProcedure.txt, serverCrash.png, splitAndGc.png
>
>
> When i assign a region A the process is as follows:
> step1 : A is assigned to rs1 , and rs1 fails to open it .
> step2 : assignProcedure handleFailure .
> step3 : A is assign to rs2 and rs success to open it .
> Above is the normal flow . However when rs1 is restart after the reigon A was
> split and GCRegionProcedure was successed , the region A appare again !
> The region is that reigon A is not removed from the serverMap correctly when
> assignprocedure handleFailure . Because the code regionNode.offline() make
> the regionNode's regionLocation to be null and make regionNode's state to
> OFFLINE . So when the code
> env.getAssignmentManager().undoRegionAsOpening(regionNode) do nothing . So
> when the rs1 restart event triggers a serverCrashProcedure, it will get
> reigons from serverMap and it will get the region A then A will be assigned
> and hdfs dir will be created.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)