Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 188B117BA0 for ; Thu, 10 Sep 2015 14:23:37 +0000 (UTC) Received: (qmail 26069 invoked by uid 500); 10 Sep 2015 14:23:36 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 25968 invoked by uid 500); 10 Sep 2015 14:23:36 -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 25954 invoked by uid 99); 10 Sep 2015 14:23:35 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Sep 2015 14:23:35 +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 8581AC009C for ; Thu, 10 Sep 2015 14:23:35 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.891 X-Spam-Level: *** X-Spam-Status: No, score=3.891 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_KAM_HTML_FONT_INVALID=0.01, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id SaJc1-3HgcFz for ; Thu, 10 Sep 2015 14:23:26 +0000 (UTC) Received: from mail-yk0-f178.google.com (mail-yk0-f178.google.com [209.85.160.178]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id BBE402308D for ; Thu, 10 Sep 2015 14:23:25 +0000 (UTC) Received: by ykdu9 with SMTP id u9so59583995ykd.2 for ; Thu, 10 Sep 2015 07:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=iCcP+8OkB/dASQD9oH1VO0FWpKHkmj7AYXgdc9PuKnY=; b=eT6vxOkUhVBrMd0nxXYHBXC9z5RLrDpakA3paZ7Mbsr11ggeRtH2FhvGAOVZepK1hP DGcfYXKIYBFssSRvXh3h2KRl2IwM4ta/fV0yCCQyEWm2wYMkDs4p+XpAqZ265peBwBN/ rt3rfXFfkPIqh9Y15D8EaQrWll0kmuV2CMX6IGWPePMJa4bVrNTmkK9l+sYO4v87LZaw sxxvplAfJtFQiiU8fr6nwVoWwRy1gNbACD/YyW37wuJsLfEgfZAPltUwdxSgVUoQMMIR xJTLl6ULarK++VIbMMT8wgzFlmooIe/HXo5B765I2ELaJAdGZ/Ax7yIWzn9Es+hb3V0f TUGA== MIME-Version: 1.0 X-Received: by 10.13.203.83 with SMTP id n80mr33455424ywd.150.1441895004898; Thu, 10 Sep 2015 07:23:24 -0700 (PDT) Received: by 10.37.210.197 with HTTP; Thu, 10 Sep 2015 07:23:24 -0700 (PDT) In-Reply-To: <2015091021094953084020@sina.com> References: <2015091021094953084020@sina.com> Date: Thu, 10 Sep 2015 07:23:24 -0700 Message-ID: Subject: Re: NotServingRegion: hbase region closed forever when open region response time out From: Ted Yu To: "zhou_shuaifeng@sina.com" Cc: "dev@hbase.apache.org" , =?UTF-8?B?5byg6ZOO?= , wangyongqiang0617 Content-Type: multipart/alternative; boundary=001a11481e0a921164051f6557d8 --001a11481e0a921164051f6557d8 Content-Type: text/plain; charset=UTF-8 Can you come up with a test that shows the problem ? Consider opening a JIRA with anonymized master log, your test and proposed solution (if you have one). Cheers On Thu, Sep 10, 2015 at 6:09 AM, zhou_shuaifeng@sina.com < zhou_shuaifeng@sina.com> wrote: > Hi all, > I found a situation may cause region closed forever, and this > situation happend usually on my cluster, version is 0.98.10, but 1.1.2 also > have the problem: > 1, master send region open to regionserver > 2, rs open a handler do openregion > 3, rs return resopnse to master > 3, master not received the response, or timeout, send open region again > 4, rs already opened the region > 5, master processAlreadyOpenedRegion, update regionstate open in > master memory > 6, master received zk message region opened(for some reason late, eg: > net work), and triger update regionstate open, but find that region already > opened, ERROR! > 7, master send close region, and region be closed forever. > > may be a solution is change processAlreadyOpenedRegion in class > AssignmentManager: > > > private void processAlreadyOpenedRegion(HRegionInfo region, ServerName sn) { > // Remove region from in-memory transition and unassigned node from ZK > // While trying to enable the table the regions of the table were > // already enabled. > LOG.debug("ALREADY_OPENED " + region.getRegionNameAsString() > + " to " + sn); > String encodedName = region.getEncodedName(); > > /** > * check region state in zk, if already opened, return; leave the > regionStates work to zkStatus change to trigger. > **/ > > > > deleteNodeInStates(encodedName, "offline", sn, EventType.M_ZK_REGION_OFFLINE); > regionStates.regionOnline(region, sn); > } > ------------------------------ > zhou_shuaifeng@sina.com > --001a11481e0a921164051f6557d8--