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 06A8B9B9C for ; Fri, 17 Feb 2012 17:30:23 +0000 (UTC) Received: (qmail 94866 invoked by uid 500); 17 Feb 2012 17:30:22 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 94825 invoked by uid 500); 17 Feb 2012 17:30:22 -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 94817 invoked by uid 99); 17 Feb 2012 17:30:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Feb 2012 17:30:22 +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; Fri, 17 Feb 2012 17:30:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 79F1A1BCFBA for ; Fri, 17 Feb 2012 17:29:59 +0000 (UTC) Date: Fri, 17 Feb 2012 17:29:59 +0000 (UTC) From: "stack (Updated) (JIRA)" To: issues@hbase.apache.org Message-ID: <135790760.51345.1329499799500.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1128011306.49836.1329461759662.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HBASE-5425) Punt on the timeout doesn't work in BulkEnabler#waitUntilDone (master's EnableTableHandler) 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-5425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] stack updated HBASE-5425: ------------------------- Resolution: Fixed Fix Version/s: 0.94.0 Hadoop Flags: Reviewed Status: Resolved (was: Patch Available) Committed to trunk. Thanks for the patch Terry. > Punt on the timeout doesn't work in BulkEnabler#waitUntilDone (master's EnableTableHandler) > -------------------------------------------------------------------------------------------- > > Key: HBASE-5425 > URL: https://issues.apache.org/jira/browse/HBASE-5425 > Project: HBase > Issue Type: Bug > Components: master > Affects Versions: 0.90.5, 0.92.0 > Reporter: terry zhang > Fix For: 0.94.0 > > Attachments: HBASE-5425.patch > > > please take a look at the code below in EnableTableHandler(hbase master): > {code:title=EnableTableHandler.java|borderStyle=solid} > protected boolean waitUntilDone(long timeout) > throws InterruptedException { > > ..... > int lastNumberOfRegions = this.countOfRegionsInTable; > while (!server.isStopped() && remaining > 0) { > Thread.sleep(waitingTimeForEvents); > regions = assignmentManager.getRegionsOfTable(tableName); > if (isDone(regions)) break; > // Punt on the timeout as long we make progress > if (regions.size() > lastNumberOfRegions) { > lastNumberOfRegions = regions.size(); > timeout += waitingTimeForEvents; > } > remaining = timeout - (System.currentTimeMillis() - startTime); > .... > } > private boolean isDone(final List regions) { > return regions != null && regions.size() >= this.countOfRegionsInTable; > } > {code} > We can easily find out if we let lastNumberOfRegions = this.countOfRegionsInTable , the function of punt on timeout code will never be executed. I think initlize lastNumberOfRegions = 0 can make it work. -- 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