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 0B6A2975D for ; Sat, 26 Nov 2011 16:52:01 +0000 (UTC) Received: (qmail 70351 invoked by uid 500); 26 Nov 2011 16:52:01 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 70324 invoked by uid 500); 26 Nov 2011 16:52:01 -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 70223 invoked by uid 99); 26 Nov 2011 16:52:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Nov 2011 16:52:01 +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; Sat, 26 Nov 2011 16:52:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9AA3BA136F for ; Sat, 26 Nov 2011 16:51:40 +0000 (UTC) Date: Sat, 26 Nov 2011 16:51:40 +0000 (UTC) From: "Ted Yu (Commented) (JIRA)" To: issues@hbase.apache.org Message-ID: <1464614001.13767.1322326300634.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1880519323.48700.1321779171612.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-4833) HRegionServer stops could be 0.5s faster 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-4833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157543#comment-13157543 ] Ted Yu commented on HBASE-4833: ------------------------------- Integrated to TRUNK. Thanks for the patch, N. > HRegionServer stops could be 0.5s faster > ---------------------------------------- > > Key: HBASE-4833 > URL: https://issues.apache.org/jira/browse/HBASE-4833 > Project: HBase > Issue Type: Improvement > Components: regionserver, test > Affects Versions: 0.94.0 > Environment: all > Reporter: nkeywal > Assignee: nkeywal > Priority: Minor > Attachments: 4833_trunk_hregionserver.patch, 4833_trunk_hregionserver.v2.patch > > > The current implementation of HRegionServer#stop is > {noformat} > public void stop(final String msg) { > this.stopped = true; > LOG.info("STOPPED: " + msg); > synchronized (this) { > // Wakes run() if it is sleeping > notifyAll(); // FindBugs NN_NAKED_NOTIFY > } > } > {noformat} > The notification is sent on the wrong object and does nothing. As a consequence, the region server continues to sleep instead of waking up and stopping immediately. A correct implementation is: > {noformat} > public void stop(final String msg) { > this.stopped = true; > LOG.info("STOPPED: " + msg); > // Wakes run() if it is sleeping > sleeper.skipSleepCycle(); > } > {noformat} > Then the region server stops immediately. This makes the region server stops 0,5s faster on average, which is quite useful for unit tests. > However, with this fix, TestRegionServerCoprocessorExceptionWithAbort does not work. > It likely because the code does no expect the region server to stop that fast. See HBASE-4832 -- 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