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

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

[~huaxiang]
Good point. But after this piece of code you can see that
{code}
serverRegions.add(region);
          cluster.doAssignRegion(region, serverName);
          serverIdx = (j + serverIdx + 1) % numServers; //remain from next 
server
          assigned = true;
          break;
        }
      }
      if (!assigned) {
        lastFewRegions.add(region);
      }
{code}
So if the INNER loop is does not find a server we collect those regions as 
'lastFewRegions' and we assign them randomly to the available servers. So we 
should be good here.

> Split of a region with replicas creates all daughter regions and its replica 
> in same server
> -------------------------------------------------------------------------------------------
>
>                 Key: HBASE-20741
>                 URL: https://issues.apache.org/jira/browse/HBASE-20741
>             Project: HBase
>          Issue Type: Bug
>          Components: read replicas
>    Affects Versions: 3.0.0, 2.0.0
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>            Priority: Major
>             Fix For: 3.0.0, 2.2.0
>
>         Attachments: HBASE-20741.patch, HBASE-20741_1.patch, 
> HBASE-20741_2.patch, HBASE-20741_2.patch, HBASE-20741_3.patch
>
>
> Generally it is better that the parent region when split creates the daughter 
> region in the same target server. 
> But for replicas also we do the same and all the replica regions are created 
> in the same target server. We should ideally be doing a round robin and only 
> the primary daughter region should be opened in the intended target server 
> (where the parent was previously opened).
> [~huaxiang] FYI.



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

Reply via email to