hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chia-Ping Tsai (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HBASE-12759) numMaxRegionsPerTable is not updated correctly in BaseLoadBalancer.regionMoved
Date Sat, 26 Aug 2017 14:32:00 GMT

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

Chia-Ping Tsai resolved HBASE-12759.
------------------------------------
    Resolution: Duplicate

It is resolved by HBASE-17658 and HBASE-18480

> numMaxRegionsPerTable is not updated correctly in BaseLoadBalancer.regionMoved
> ------------------------------------------------------------------------------
>
>                 Key: HBASE-12759
>                 URL: https://issues.apache.org/jira/browse/HBASE-12759
>             Project: HBase
>          Issue Type: Bug
>          Components: Balancer
>    Affects Versions: 1.0.0
>            Reporter: Jianwei Cui
>            Priority: Minor
>         Attachments: HBASE-12759-trunk.patch
>
>
> numMaxRegionsPerTable will be updated in BaseLoadBalancer.regionMoved(...) as:
> {code}
>     void regionMoved(int region, int oldServer, int newServer) {
>       ....
>       int tableIndex = regionIndexToTableIndex[region];
>       if (oldServer >= 0) {
>         numRegionsPerServerPerTable[oldServer][tableIndex]--;
>       }
>       numRegionsPerServerPerTable[newServer][tableIndex]++;
>       //check whether this caused maxRegionsPerTable in the new Server to be updated
>       if (numRegionsPerServerPerTable[newServer][tableIndex] > numMaxRegionsPerTable[tableIndex])
{
>         numRegionsPerServerPerTable[newServer][tableIndex] = numMaxRegionsPerTable[tableIndex];
 // ==> should be: numMaxRegionsPerTable[tableIndex] = numRegionsPerServerPerTable[newServer][tableIndex];
>       } else if (oldServer >= 0 && (numRegionsPerServerPerTable[oldServer][tableIndex]
+ 1)
>           == numMaxRegionsPerTable[tableIndex]) {
>         //recompute maxRegionsPerTable since the previous value was coming from the old
server
>         // ===> should reset numMaxRegionsPerTable[tableIndex] before recompute :
numMaxRegionsPerTable[tableIndex] = 0;
>         for (int serverIndex = 0 ; serverIndex < numRegionsPerServerPerTable.length;
serverIndex++) {
>           if (numRegionsPerServerPerTable[serverIndex][tableIndex] > numMaxRegionsPerTable[tableIndex])
{
>             numMaxRegionsPerTable[tableIndex] = numRegionsPerServerPerTable[serverIndex][tableIndex];
>           }
>         }
>       }
> {code}
> It seems that numMaxRegionsPerTable is not updated correctly as shown above.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message