Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id ABD122004F2 for ; Sat, 26 Aug 2017 16:32:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A25D4165195; Sat, 26 Aug 2017 14:32:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E7DCC165194 for ; Sat, 26 Aug 2017 16:32:05 +0200 (CEST) Received: (qmail 9814 invoked by uid 500); 26 Aug 2017 14:32:04 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 9803 invoked by uid 99); 26 Aug 2017 14:32:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Aug 2017 14:32:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 25714C1E67 for ; Sat, 26 Aug 2017 14:32:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 9sER7Px0Cbsx for ; Sat, 26 Aug 2017 14:32:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 8D88A60CE6 for ; Sat, 26 Aug 2017 14:32:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 9FC29E018C for ; Sat, 26 Aug 2017 14:32:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3D1B625381 for ; Sat, 26 Aug 2017 14:32:00 +0000 (UTC) Date: Sat, 26 Aug 2017 14:32:00 +0000 (UTC) From: "Chia-Ping Tsai (JIRA)" To: dev@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (HBASE-12759) numMaxRegionsPerTable is not updated correctly in BaseLoadBalancer.regionMoved MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 26 Aug 2017 14:32:06 -0000 [ 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)