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 6C01011465 for ; Wed, 2 Jul 2014 13:54:25 +0000 (UTC) Received: (qmail 38647 invoked by uid 500); 2 Jul 2014 13:54:25 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 38592 invoked by uid 500); 2 Jul 2014 13:54:25 -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 38566 invoked by uid 99); 2 Jul 2014 13:54:25 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jul 2014 13:54:25 +0000 Date: Wed, 2 Jul 2014 13:54:24 +0000 (UTC) From: "bharath v (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-11405) Multiple invocations of hbck in parallel disables balancer permanently 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-11405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] bharath v updated HBASE-11405: ------------------------------ Attachment: HBASE-11405-trunk.patch This patch creates a file in / and maintains a lease on it till hbck exits. Parallel instances of hbck check if such a file exists and bail out if necessary. Added a shutdownhook() to this class to clean up the lock file incase user kills hbck with a SIGTERM. I make sure that the cleanup is done only once using a flag. > Multiple invocations of hbck in parallel disables balancer permanently > ----------------------------------------------------------------------- > > Key: HBASE-11405 > URL: https://issues.apache.org/jira/browse/HBASE-11405 > Project: HBase > Issue Type: Bug > Components: Balancer, hbck > Affects Versions: 0.99.0 > Reporter: bharath v > Attachments: HBASE-11405-trunk.patch > > > This is because of the following piece of code in hbck > {code:borderStyle=solid} > boolean oldBalancer = admin.setBalancerRunning(false, true); > try { > onlineConsistencyRepair(); > } > finally { > admin.setBalancerRunning(oldBalancer, false); > } > {code} > Newer invocations set oldBalancer to false as it was disabled by previous invocations and this disables balancer permanently unless its manually turned on by the user. Easy to reproduce, just run hbck 100 times in a loop in 2 different sessions and you can see that balancer is set to false in the HMaster logs. -- This message was sent by Atlassian JIRA (v6.2#6252)