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

Ted Yu commented on HBASE-7790:
-------------------------------

{code}
+      if (!openSuccessful) {
+        doCleanUpOnFailedOpen(region, transitionedToOpening);
+      }
       final Boolean current = this.rsServices.getRegionsInTransitionInRS().
           remove(this.regionInfo.getEncodedNameAsBytes());
 
@@ -191,19 +184,35 @@
       // 1) this.rsServices.addToOnlineRegions(region);
       // 2) the ZK state.
       if (openSuccessful) {
{code}
The variable current is only used in the if block where openSuccessful is true. 
Maybe restructure the code such that assignment to current is wrapped in else 
block ?

Patch looks good.
                
> Refactor OpenRegionHandler so that the cleanup happens in one place - the 
> finally block
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-7790
>                 URL: https://issues.apache.org/jira/browse/HBASE-7790
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 0.96.0
>
>         Attachments: HBASE-7790.patch
>
>
> This is based on discussion in HBASE-7698.  Jimmy suggested this improvment.
> Look at 
> https://issues.apache.org/jira/browse/HBASE-7698?focusedCommentId=13572736&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13572736

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to