You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2025/07/24 09:18:00 UTC

[jira] [Updated] (HBASE-29467) Redundant conditions in CostFunction.scale() method

     [ https://issues.apache.org/jira/browse/HBASE-29467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated HBASE-29467:
-----------------------------------
    Labels: pull-request-available  (was: )

> Redundant conditions in CostFunction.scale() method
> ---------------------------------------------------
>
>                 Key: HBASE-29467
>                 URL: https://issues.apache.org/jira/browse/HBASE-29467
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Jialun Peng
>            Priority: Major
>              Labels: pull-request-available
>
> Description: In org.apache.hadoop.hbase.master.balancer.CostFunction.scale(), there are redundant conditions: 1. The check `max <= min` appears twice 2. The check `Math.abs(max - min) <= costEpsilon` appears twice
>  
> The first if-block already covers all these cases, making the second if-block completely redundant as it will never be reached with conditions that would make it evaluate differently.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)