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 E2109200C14 for ; Tue, 7 Feb 2017 11:11:49 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E0951160B3E; Tue, 7 Feb 2017 10:11:49 +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 0F241160B4B for ; Tue, 7 Feb 2017 11:11:48 +0100 (CET) Received: (qmail 97488 invoked by uid 500); 7 Feb 2017 10:11:48 -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 97473 invoked by uid 99); 7 Feb 2017 10:11:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2017 10:11:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id AD1441A0049 for ; Tue, 7 Feb 2017 10:11:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.949 X-Spam-Level: X-Spam-Status: No, score=-0.949 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id FFiBWZqnwkf0 for ; Tue, 7 Feb 2017 10:11:46 +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 A9D4460CF4 for ; Tue, 7 Feb 2017 10:11:45 +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 0ACAEE05E9 for ; Tue, 7 Feb 2017 10:11:43 +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 10A592529A for ; Tue, 7 Feb 2017 10:11:42 +0000 (UTC) Date: Tue, 7 Feb 2017 10:11:42 +0000 (UTC) From: "Hudson (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-17264) Processing RIT with offline state will always fail to open the first time MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 07 Feb 2017 10:11:50 -0000 [ https://issues.apache.org/jira/browse/HBASE-17264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15855683#comment-15855683 ] Hudson commented on HBASE-17264: -------------------------------- FAILURE: Integrated in Jenkins build HBase-1.1-JDK8 #1922 (See [https://builds.apache.org/job/HBase-1.1-JDK8/1922/]) HBASE-17264 Processing RIT with offline state will always fail to open (tedyu: rev 4348dd60202f1ec9bc319f71436debac0637ce48) * (edit) hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManager.java * (edit) hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java > Processing RIT with offline state will always fail to open the first time > ------------------------------------------------------------------------- > > Key: HBASE-17264 > URL: https://issues.apache.org/jira/browse/HBASE-17264 > Project: HBase > Issue Type: Bug > Components: Region Assignment > Affects Versions: 1.1.7 > Reporter: Allan Yang > Assignee: Allan Yang > Fix For: 1.4.0, 1.3.1, 1.2.5, 1.1.9 > > Attachments: HBASE-17264-branch-1.1.patch > > > In Assignment#processRegionsInTransition, when handling regions with M_ZK_REGION_OFFLINE state, we used a handler to reassign this region. But, when calling assign, we passed not to set the zk node > {code} > case M_ZK_REGION_OFFLINE: > // Insert in RIT and resend to the regionserver > regionStates.updateRegionState(rt, State.PENDING_OPEN); > final RegionState rsOffline = regionStates.getRegionState(regionInfo); > this.executorService.submit( > new EventHandler(server, EventType.M_MASTER_RECOVERY) { > @Override > public void process() throws IOException { > ReentrantLock lock = locker.acquireLock(regionInfo.getEncodedName()); > try { > RegionPlan plan = new RegionPlan(regionInfo, null, sn); > addPlan(encodedName, plan); > assign(rsOffline, false, false); //we decide to not to setOfflineInZK > } finally { > lock.unlock(); > } > } > }); > break; > {code} > But, when setOfflineInZK is false, we passed a zk node vesion of -1 to the regionserver, meaning the zk node does not exists. But actually the offline zk node does exist with a different version. RegionServer will report fail to open because of this. > This situation is trully happened in our test environment. Though the master will recevied the FAILED_OPEN zk event and retry later, but due to a another bug(HBASE-17265). The Region will be remain in closed state forever. > Master assign region in RIT > {noformat} > 2016-11-23 17:11:46,842 INFO [example.org:30001.activeMasterManager] master.AssignmentManager: Processing 57513956a7b671f4e8da1598c2e2970e in state: M_ZK_REGION_OFFLINE > 2016-11-23 17:11:46,842 INFO [example.org:30001.activeMasterManager] master.RegionStates: Transition {57513956a7b671f4e8da1598c2e2970e state=OFFLINE, ts=1479892306738, server=example.org,30003,1475893095003} to {57513956a7b671f4e8da1598c2e2970e state=PENDING_OPEN, ts=1479892306842, server=example.org,30003,1479780976834} > 2016-11-23 17:11:46,842 INFO [example.org:30001.activeMasterManager] master.AssignmentManager: Processed region 57513956a7b671f4e8da1598c2e2970e in state M_ZK_REGION_OFFLINE, on server: example.org,30003,1479780976834 > 2016-11-23 17:11:46,843 INFO [MASTER_SERVER_OPERATIONS-example.org:30001-0] master.AssignmentManager: Assigning test,QFO7M,1475986053104.57513956a7b671f4e8da1598c2e2970e. to example.org,30003,1479780976834 > {noformat} > RegionServer recevied the open region request, and new a RegionOpenHandler to open the region, but only to find the RIT node's version is not as it expected. RS transition the RIT ZK node to failed open in the end > {noformat} > 2016-11-23 17:11:46,860 WARN [RS_OPEN_REGION-example.org:30003-1] coordination.ZkOpenRegionCoordination: Failed transition from OFFLINE to OPENING for region=57513956a7b671f4e8da1598c2e2970e > 2016-11-23 17:11:46,861 WARN [RS_OPEN_REGION-example.org:30003-1] handler.OpenRegionHandler: Region was hijacked? Opening cancelled for encodedName=57513956a7b671f4e8da1598c2e2970e > 2016-11-23 17:11:46,860 WARN [RS_OPEN_REGION-example.org:30003-1] zookeeper.ZKAssign: regionserver:30003-0x15810b5f633015f, quorum=hbase4dev04.et2sqa:2181,hbase4dev05.et2sqa:2181,hbase4dev06.et2sqa:2181, baseZNode=/test-hbase11-func2 Attempt to transition the unassigned node for 57513956a7b671f4e8da1598c2e2970e from M_ZK_REGION_OFFLINE to RS_ZK_REGION_OPENING failed, the node existed but was version 3 not the expected version -1 > {noformat} > Master recevied this zk event and begin to handle RS_ZK_REGION_FAILED_OPEN > {noformat} > 2016-11-23 17:11:46,944 DEBUG [AM.ZK.Worker-pool2-t1] master.AssignmentManager: Handling RS_ZK_REGION_FAILED_OPEN, server=example.org,30003,1479780976834, region=57513956a7b671f4e8da1598c2e2970e, current_state={57513956a7b671f4e8da1598c2e2970e state=PENDING_OPEN, ts=1479892306843, server=example.org,30003,1479780976834} > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)