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

ramkrishna.s.vasudevan commented on HBASE-4153:
-----------------------------------------------

@Stack
{code}
-    this.regionsInTransitionInRS.add(region.getEncodedNameAsBytes());
+    this.regionsInTransitionInRS.putIfAbsent(encodedName, true);
{code}
Previously it was set.add() which was calling the map's entry set put if 
absent.  So functionally there is no change. 
The usage of map is to just get the type of operation whether it was open or 
close.A
LREADY_TRANSITING changed to ALREADY_TRANSITIONING. We dont need the map in the 
master side.  Just use the map to determine the type of operation in the RS 
side , form the exception message based on the entry in the map and throw 
exception.

Stack, if there is anything else you wanted to change.  Let me know am ready to 
do it.
Tests are passing.

> Handle RegionAlreadyInTransitionException in AssignmentManager
> --------------------------------------------------------------
>
>                 Key: HBASE-4153
>                 URL: https://issues.apache.org/jira/browse/HBASE-4153
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Jean-Daniel Cryans
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 0.92.0
>
>         Attachments: 4153-v3.txt, HBASE-4153_1.patch, HBASE-4153_2.patch, 
> HBASE-4153_3.patch
>
>
> Comment from Stack over in HBASE-3741:
> {quote}
> Question: Looking at this patch again, if we throw a 
> RegionAlreadyInTransitionException, won't we just assign the region elsewhere 
> though RegionAlreadyInTransitionException in at least one case here is saying 
> that the region is already open on this regionserver?
> {quote}
> Indeed looking at the code it's going to be handled the same way other 
> exceptions are. Need to add special cases for assign and unassign.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to