[
https://issues.apache.org/jira/browse/HBASE-10620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13932476#comment-13932476
]
Enis Soztutar commented on HBASE-10620:
---------------------------------------
v3 patch fixed a LB bug:
{code}
- balancerRan = plans != null;
+ balancerRan = plans.size() != 0;
{code}
plans is previously initialized to a new ArrayList, so balancerRan was always
true regardless of whether the LB generated any plans or not. Although the
patches fixes the code to be correct in terms of the intended semantics, I
think the intended semantics was wrong. Namely, if the LB does not generate any
plans (because the cluster is already balanced) we should return TRUE.
Otherwise outside callers (from shell) have no way of distinguishing whether
the balancer cannot be run because of RIT, or it was able to run, but no plans
were generated (because needsBalance() returned false) etc.
> LoadBalancer.needsBalance() should check for co-located region replicas as
> well
> -------------------------------------------------------------------------------
>
> Key: HBASE-10620
> URL: https://issues.apache.org/jira/browse/HBASE-10620
> Project: HBase
> Issue Type: Sub-task
> Reporter: Enis Soztutar
> Assignee: Devaraj Das
> Fix For: hbase-10070
>
> Attachments: 10620-1.txt, 10620-2.txt, 10620-3-addendum.patch,
> 10620-3.txt
>
>
> This is a left over TODO from reviews of HBASE-10351.
> LB.needsBalance() does some basic checking before running the LB.balance()
> method. We need to check whether there are co-located regions in this method
> so that the balancer can increase availability.
--
This message was sent by Atlassian JIRA
(v6.2#6252)