Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D16B9C7F for ; Tue, 28 Feb 2012 14:54:10 +0000 (UTC) Received: (qmail 57262 invoked by uid 500); 28 Feb 2012 14:54:10 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 57219 invoked by uid 500); 28 Feb 2012 14:54:10 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 57211 invoked by uid 99); 28 Feb 2012 14:54:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 14:54:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 14:54:07 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 666CB33E45F for ; Tue, 28 Feb 2012 14:53:46 +0000 (UTC) Date: Tue, 28 Feb 2012 14:53:46 +0000 (UTC) From: "ramkrishna.s.vasudevan (Updated) (JIRA)" To: issues@hbase.apache.org Message-ID: <1396351890.28239.1330440826421.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1388424467.22584.1330331988820.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HBASE-5482) In 0.90, balancer algo leading to same region balanced twice and picking same region with Src and Destination as same RS. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-5482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ramkrishna.s.vasudevan updated HBASE-5482: ------------------------------------------ Attachment: HBASE-5482_1.patch Patch for 0.90. > In 0.90, balancer algo leading to same region balanced twice and picking same region with Src and Destination as same RS. > ------------------------------------------------------------------------------------------------------------------------- > > Key: HBASE-5482 > URL: https://issues.apache.org/jira/browse/HBASE-5482 > Project: HBase > Issue Type: Bug > Components: master > Affects Versions: 0.90.5 > Reporter: ramkrishna.s.vasudevan > Assignee: ramkrishna.s.vasudevan > Fix For: 0.90.7 > > Attachments: HBASE-5482_1.patch > > > There are possibility of 2 problems > -> When we populate regionsToMove while iterating the serverinfo in descending manner there is a chance that the same region can be added twice. > Because in the first loop we do a randomization of the regions. > Where as when we get we have neededRegions!= 0 we just get the region in the index and add it again . This may lead to have same region in the regionsToMove list. > -> Another problem is > when the problem in the first point happens then there is a chance that > the regionToMove can have the same src and destination and the same region can be picked every 5 mins. > {code} > for(Map.Entry> server : > serversByLoad.descendingMap().entrySet()) { > BalanceInfo balanceInfo = serverBalanceInfo.get(server.getKey()); > int idx = > balanceInfo == null ? 0 : balanceInfo.getNextRegionForUnload(); > if (idx >= server.getValue().size()) break; > HRegionInfo region = server.getValue().get(idx); > if (region.isMetaRegion()) continue; // Don't move meta regions. > regionsToMove.add(new RegionPlan(region, server.getKey(), null)); > if(--neededRegions == 0) { > // No more regions needed, done shedding > break; > } > } > {code} > If i have meta and root in the top two loaded region server(totally 3 RS), we just skip the regions in those region server and populate the region from the least loaded RS. > Then in the next loop we iterate from the least loaded server and populate the destination as also the same server. > This is leading to a condition where every 5 min balancing happens and also the server is same for src and dest. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira