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

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

Fixed the reason for the UT failure. It was because in the LB code I was trying 
to see if the list of regions had atleast one replica. It was so happening that 
in my test env (even today I ran it 25 times) every time I was getting more 
than 5 regions to the retain Assignment API. So  one of them turned out to be a 
replica region always. But in the jenkins build it was so happening that the 
list of regions had only one region and that one region was a primary region. 
So when it was the case we were not taking the entire snapshot of assignment so 
we were doing its assignment to the server where there was another replica. 
It would be better if we can centrally know some where that for a given region 
are there any replicas without iterating through the AM's region states. Other 
way is to get the details from the TableDescriptor of Master but I fear it is 
not using the cache in the master side and we may end up doing a FS read there. 
 

> ServerCrashProcedure should select target server where no other replicas 
> exist for the current region
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-21102
>                 URL: https://issues.apache.org/jira/browse/HBASE-21102
>             Project: HBase
>          Issue Type: Bug
>          Components: Region Assignment
>    Affects Versions: 3.0.0, 2.2.0
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>            Priority: Major
>         Attachments: HBASE-21102_1.patch, HBASE-21102_2.patch, 
> HBASE-21102_3.patch, HBASE-21102_4.patch, HBASE-21102_addendum.patch, 
> HBASE-21102_initial.patch
>
>
> Currently when a server with region replica crashes, when the target server 
> is created for the replica region assignment there is no guarentee that a 
> server is selected where there is no other replica for the current region 
> getting assigned. It so happens that currently we do an assignment randomly 
> and later the LB comes and identifies these cases and again does MOVE for 
> such regions. It will be better if we can identify target servers at least 
> minimally ensuring that replicas are not colocated.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to