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

Zhihong Yu commented on HBASE-4880:
-----------------------------------

TestAdmin#testForceSplit would fail if I comment out the following line in 
HRegionServer.postOpenDeployTasks():
{code}
-    addToOnlineRegions(r);
+    // addToOnlineRegions(r);
{code}
This is the error:
{code}
org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException: Failed 1 
action: NotServingRegionException: 1 time, servers with issues: 
lm-sjn-xx:65442, 
        at 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.processBatchCallback(HConnectionManager.java:1641)
        at 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.processBatch(HConnectionManager.java:1409)
        at org.apache.hadoop.hbase.client.HTable.flushCommits(HTable.java:892)
        at org.apache.hadoop.hbase.client.HTable.doPut(HTable.java:750)
        at org.apache.hadoop.hbase.client.HTable.put(HTable.java:725)
        at 
org.apache.hadoop.hbase.client.TestAdmin.splitTest(TestAdmin.java:805)
        at 
org.apache.hadoop.hbase.client.TestAdmin.testForceSplit(TestAdmin.java:108)
{code}
                
> Region is on service before completing openRegionHanlder, may cause data loss
> -----------------------------------------------------------------------------
>
>                 Key: HBASE-4880
>                 URL: https://issues.apache.org/jira/browse/HBASE-4880
>             Project: HBase
>          Issue Type: Bug
>            Reporter: chunhui shen
>            Assignee: chunhui shen
>         Attachments: hbase-4880.patch
>
>
> OpenRegionHandler in regionserver is processed as the following steps:
> {code}
> 1.openregion()(Through it, closed = false, closing = false)
> 2.addToOnlineRegions(region)
> 3.update .meta. table 
> 4.update ZK's node state to RS_ZK_REGION_OPEND
> {code}
> We can find that region is on service before Step 4.
> It means client could put data to this region after step 3.
> What will happen if step 4 is failed processing?
> It will execute OpenRegionHandler#cleanupFailedOpen which will do closing 
> region, and master assign this region to another regionserver.
> If closing region is failed, the data which is put between step 3 and step 4 
> may loss, because the region has been opend on another regionserver and be 
> put new data. Therefore, it may not be recoverd through replayRecoveredEdit() 
> because the edit's LogSeqId is smaller than current region SeqId.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to