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 4CCA9200B11 for ; Mon, 13 Jun 2016 22:31:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4B5E7160A1A; Mon, 13 Jun 2016 20:31:07 +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 93208160A3C for ; Mon, 13 Jun 2016 22:31:06 +0200 (CEST) Received: (qmail 54144 invoked by uid 500); 13 Jun 2016 20:31:04 -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 53668 invoked by uid 99); 13 Jun 2016 20:31:04 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jun 2016 20:31:04 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2F4402C1F75 for ; Mon, 13 Jun 2016 20:31:04 +0000 (UTC) Date: Mon, 13 Jun 2016 20:31:04 +0000 (UTC) From: "Stephen Yuan Jiang (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-16016) AssignmentManager#waitForAssignment could have unexpected negative deadline MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 13 Jun 2016 20:31:07 -0000 [ https://issues.apache.org/jira/browse/HBASE-16016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stephen Yuan Jiang updated HBASE-16016: --------------------------------------- Attachment: (was: WaitOverflow.patch) > AssignmentManager#waitForAssignment could have unexpected negative deadline > --------------------------------------------------------------------------- > > Key: HBASE-16016 > URL: https://issues.apache.org/jira/browse/HBASE-16016 > Project: HBase > Issue Type: Bug > Reporter: Stephen Yuan Jiang > Assignee: Stephen Yuan Jiang > > AssignmentManager#waitForAssignment(HRegionInfo regionInfo) passes Long.MAX_VALUE deadline and intends to wait forever. However, the deadline would be overflowed from AssignmentManager#waitForAssignment(final Collection regionSet, final boolean waitTillAllAssigned, final int reassigningRegions, final long minEndTime), which would cause no wait! > {code} > /** > * Waits until the specified region has completed assignment. > *

> * If the region is already assigned, returns immediately. Otherwise, method > * blocks until the region is assigned. > * @param regionInfo region to wait on assignment for > * @return true if the region is assigned false otherwise. > * @throws InterruptedException > */ > public boolean waitForAssignment(HRegionInfo regionInfo) > throws InterruptedException { > ArrayList regionSet = new ArrayList(1); > regionSet.add(regionInfo); > return waitForAssignment(regionSet, true, Long.MAX_VALUE); > } > /** > * Waits until the specified region has completed assignment, or the deadline is reached. > */ > protected boolean waitForAssignment(final Collection regionSet, > final boolean waitTillAllAssigned, final int reassigningRegions, > final long minEndTime) throws InterruptedException { > long deadline = minEndTime + bulkPerRegionOpenTimeGuesstimate * (reassigningRegions + 1); // ----> OVERFLOW > return waitForAssignment(regionSet, waitTillAllAssigned, deadline); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)