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 A5F3B10F82 for ; Sun, 30 Nov 2014 03:45:13 +0000 (UTC) Received: (qmail 619 invoked by uid 500); 30 Nov 2014 03:45:13 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 566 invoked by uid 500); 30 Nov 2014 03:45:13 -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 555 invoked by uid 99); 30 Nov 2014 03:45:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Nov 2014 03:45:13 +0000 Date: Sun, 30 Nov 2014 03:45:13 +0000 (UTC) From: "Jeffrey Zhong (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-12588) Need to fail writes when row lock can't be acquired 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-12588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14229003#comment-14229003 ] Jeffrey Zhong commented on HBASE-12588: --------------------------------------- I agree with [~Apache9]. batchMutate is all right and we just need to make sure that our own code do check result for each update operation after a batchMutate call. Thanks. > Need to fail writes when row lock can't be acquired > --------------------------------------------------- > > Key: HBASE-12588 > URL: https://issues.apache.org/jira/browse/HBASE-12588 > Project: HBase > Issue Type: Bug > Affects Versions: 0.98.8, 0.99.1 > Reporter: Jeffrey Zhong > Assignee: Jeffrey Zhong > Attachments: HBASE-12588.patch > > > Currently we don't fail write operations when can't acquiring row locks as shown below in HRegion#doMiniBatchMutation. > {code} > ... > RowLock rowLock = null; > try { > rowLock = getRowLock(mutation.getRow(), shouldBlock); > } catch (IOException ioe) { > LOG.warn("Failed getting lock in batch put, row=" > + Bytes.toStringBinary(mutation.getRow()), ioe); > } > if (rowLock == null) { > // We failed to grab another lock > assert !shouldBlock : "Should never fail to get lock when blocking"; > break; // stop acquiring more rows for this batch > } else { > acquiredRowLocks.add(rowLock); > } > ... > {code} > We saw this issue when there is meta corruption problem and checkRow fails with error: > {noformat} > org.apache.hadoop.hbase.regionserver.WrongRegionException: Requested row out of range for row lock on HRegion > {noformat} > While current code still continues with writes. In all cases, this is so dangerous because row locks have to be acquired before update operations to guarantee row update atomicity. -- This message was sent by Atlassian JIRA (v6.3.4#6332)