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 15BA49D06 for ; Wed, 30 Nov 2011 06:42:06 +0000 (UTC) Received: (qmail 30094 invoked by uid 500); 30 Nov 2011 06:42:05 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 30020 invoked by uid 500); 30 Nov 2011 06:42: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 30009 invoked by uid 99); 30 Nov 2011 06:42:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2011 06:42:04 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,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; Wed, 30 Nov 2011 06:42:01 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BC2B0A8771 for ; Wed, 30 Nov 2011 06:41:40 +0000 (UTC) Date: Wed, 30 Nov 2011 06:41:40 +0000 (UTC) From: "Ted Yu (Commented) (JIRA)" To: issues@hbase.apache.org Message-ID: <1179523032.24955.1322635300788.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <812266715.24849.1322632779939.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-4899) Region would be assigned twice easily with continually killing server and moving region in testing environment 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-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159859#comment-13159859 ] Ted Yu commented on HBASE-4899: ------------------------------- @Chunhui: Please let us know testing result on your QA environment. > Region would be assigned twice easily with continually killing server and moving region in testing environment > --------------------------------------------------------------------------------------------------------------- > > Key: HBASE-4899 > URL: https://issues.apache.org/jira/browse/HBASE-4899 > Project: HBase > Issue Type: Bug > Affects Versions: 0.92.0 > Reporter: chunhui shen > Assignee: chunhui shen > Attachments: hbase-4899.patch > > > Before assigning region in ServerShutdownHandler#process, it will check whether region is in RIT, > however, this checking doesn't work as the excepted in the following case: > 1.move region A from server B to server C > 2.kill server B > 3.start server B immediately > Let's see what happen in the code for the above case > {code} > for step1: > 1.1 server B close the region A, > 1.2 master setOffline for region A,(AssignmentManager#setOffline:this.regions.remove(regionInfo)) > 1.3 server C start to open region A.(Not completed) > for step3: > master ServerShutdownHandler#process() for server B > { > .. > splitlog() > ... > List regionsInTransition = > this.services.getAssignmentManager() > .processServerShutdown(this.serverName); > ... > Skip regions that were in transition unless CLOSING or PENDING_CLOSE > ... > assign region > } > {code} > In fact, when running ServerShutdownHandler#process()#this.services.getAssignmentManager().processServerShutdown(this.serverName), region A is in RIT (step1.3 not completed), but the return List regionsInTransition doesn't contain it, because region A has removed from AssignmentManager.regions by AssignmentManager#setOffline in step 1.2 > Therefore, region A will be assigned twice. > Actually, one server killed and started twice will also easily cause region assigned twice. > Exclude the above reason, another probability : > when execute ServerShutdownHandler#process()#MetaReader.getServerUserRegions ,region is included which is in RIT now. > But after completing MetaReader.getServerUserRegions, the region has been opened in other server and is not in RIT now. > In our testing environment where balancing,moving and killing are executed periodly, assigning region twice often happens, and it is hateful because it will affect other test cases. -- 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