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 96635400C for ; Fri, 8 Jul 2011 00:48:39 +0000 (UTC) Received: (qmail 23618 invoked by uid 500); 8 Jul 2011 00:48:39 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 23536 invoked by uid 500); 8 Jul 2011 00:48:38 -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 23528 invoked by uid 99); 8 Jul 2011 00:48:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jul 2011 00:48:38 +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, 08 Jul 2011 00:48:37 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8D5284B4E9 for ; Fri, 8 Jul 2011 00:48:16 +0000 (UTC) Date: Fri, 8 Jul 2011 00:48:16 +0000 (UTC) From: "Jieshan Bean (JIRA)" To: issues@hbase.apache.org Message-ID: <1116083150.9707.1310086096575.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1379235192.6821.1310031917910.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-4075) A bug in TestZKBasedOpenCloseRegion MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-4075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061699#comment-13061699 ] Jieshan Bean commented on HBASE-4075: ------------------------------------- I'll commit the patch later. Thanks stack. > A bug in TestZKBasedOpenCloseRegion > ----------------------------------- > > Key: HBASE-4075 > URL: https://issues.apache.org/jira/browse/HBASE-4075 > Project: HBase > Issue Type: Bug > Components: test > Affects Versions: 0.90.3 > Reporter: Jieshan Bean > Priority: Minor > Fix For: 0.90.4 > > > The following two test cases was executed orderly: > 1.TestZKBasedOpenCloseRegion#testCloseRegion() > 2.TestZKBasedOpenCloseRegion#testRSAlreadyProcessingRegion() > I found the problem while the two test cases used the same region with little possibility. The following describtion called the region as RegionA > (1). Region-A was closed in the test of "testCloseRegion". And it was trying to be opening at the end of "testCloseRegion". > {noformat} > 2011-06-20 08:14:24,967 DEBUG [main-EventThread] master.AssignmentManager(374): Handling transition=RS_ZK_REGION_OPENING, server=linux1.site,41784,1308528851644, region=5251635727486eb97dfbe6f953c587c3 > 2011-06-20 08:14:24,967 DEBUG [RS_OPEN_REGION-linux1.site,41784,1308528851644-2] regionserver.HRegion(311): Instantiated TestZKBasedOpenCloseRegion,ccc,1308528860373.5251635727486eb97dfbe6f953c587c3. > 2011-06-20 08:14:24,986 INFO [Thread-397] master.TestZKBasedOpenCloseRegion(213): Done with testCloseRegion > {noformat} > (2). The region next test case used was just the same region which was opening: > {noformat} > 2011-06-20 08:14:25,012 INFO [main] master.TestZKBasedOpenCloseRegion(139): .META.,,1.1028785192 > 2011-06-20 08:14:25,013 INFO [main] master.TestZKBasedOpenCloseRegion(139): TestZKBasedOpenCloseRegion,ccc,1308528860373.5251635727486eb97dfbe6f953c587c3. > {noformat} > (3) In test case 2, the code of "while (!reopenEventProcessed.get())" got an un-expect OPENED event from the prev opening. > {noformat} > EventHandlerListener openListener = > new ReopenEventListener(hri.getRegionNameAsString(), > reopenEventProcessed, EventType.RS_ZK_REGION_OPENED); > cluster.getMaster().executorService. > registerListener(EventType.RS_ZK_REGION_OPENED, openListener); > // now ask the master to move the region to hr1, will fail > TEST_UTIL.getHBaseAdmin().move(hri.getEncodedNameAsBytes(), > Bytes.toBytes(hr1.getServerName())); > > while (!reopenEventProcessed.get()) { > Threads.sleep(100); > } > {noformat} > {noformat} > 2011-06-20 08:14:25,032 DEBUG [MASTER_OPEN_REGION-linux1.site:34061-4] handler.OpenedRegionHandler(108): Opened region TestZKBasedOpenCloseRegion,ccc,1308528860373.5251635727486eb97dfbe6f953c587c3. on linux1.site,41784,1308528851644 > 2011-06-20 08:14:25,033 INFO [MASTER_OPEN_REGION-linux1.site:34061-4] master.TestZKBasedOpenCloseRegion$ReopenEventListener(170): afterProcess(org.apache.hadoop.hbase.master.handler.OpenedRegionHandler@711185e7) > 2011-06-20 08:14:25,033 INFO [MASTER_OPEN_REGION-linux1.site:34061-4] master.TestZKBasedOpenCloseRegion$ReopenEventListener(172): Finished processing RS_ZK_REGION_OPENED > {noformat} > So it think the region was opened, but really not. > > (4) So the test failed. > {noformat} > java.lang.reflect.UndeclaredThrowableException > at $Proxy24.move(Unknown Source) > at org.apache.hadoop.hbase.client.HBaseAdmin.move(HBaseAdmin.java:978) > at org.apache.hadoop.hbase.master.TestZKBasedOpenCloseRegion.testRSAlreadyProcessingRegion(TestZKBasedOpenCloseRegion.java:291) > > Caused by: org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hbase.UnknownRegionException: 5251635727486eb97dfbe6f953c587c3 > at org.apache.hadoop.hbase.master.HMaster.move(HMaster.java:725) > {noformat} > Exchange the position of the two test cases will solve the problem. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira