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

stack commented on HBASE-9696:
------------------------------

Let me try answering because Jimmy ain't around till morning [~jeffreyz]

Its two states, not four?

bq. For merging, it's a master initiated operation we should have corresponding 
memory state so future region move requests can be cancelled.

Good question.  Looking at patch again, RS_ZK_REGION_PENDING_MERGE is set 
starting the merge transaction in region and it is the master that then moves 
the znode to MERGING meaning the RS can proceed w/ the merge.  The new event 
type sends the name of the new merged region and the daughters.  That is new.  
Master now knows about the merged region before it shows up in meta registering 
it internally as a 'merging region'.  Knowing this it will NOT do something 
dumb like move the new region before it is done with the merge transaction.  
For your suggestion to work, we'd at least  need to change merge so the parent 
was sent over in the merge message (we'd have to move some of the merge logic 
over master-side too).  This pending merge state laden with parent and daughter 
regions will be good across master crash too.  Maybe we could have put this new 
content into the MERGING znode.  Jimmy will answer better.


bq. For splitting, before a region split starts, it creates a splitting RIT 
znode while a region move will try to create a closing RIT znode so only one 
operation can succeed.

Will let Jimmy answer.  My guess is that failing the assign because of a znode 
clash is complicated to recover from and to back up out of.

bq. In master recovery scenario, merging state can be restored by a few lines 
of code in the patch.

Long as we added the data about parent to MERGING znode (and changed the merge 
rpc to carry parent region info too)

Good review [~jeffreyz]

> Master recovery ignores online merge znode
> ------------------------------------------
>
>                 Key: HBASE-9696
>                 URL: https://issues.apache.org/jira/browse/HBASE-9696
>             Project: HBase
>          Issue Type: Bug
>          Components: master, Region Assignment
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>             Fix For: 0.98.0, 0.96.1
>
>         Attachments: trunk-9696.patch, trunk-9696_v2.1.patch, 
> trunk-9696_v2.patch, trunk-9696_v3.patch, trunk-9696_v3.patch
>
>
> The online merge znode uses the new region to be created.  When master 
> restarts, the new region is still unknown if the merging is not completed. 
> Therefore the znode is ignored, which should not.  That means the two merging 
> regions could be moved around.  This could cause some data loss if we are not 
> luck.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to