hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeffrey Zhong (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-12588) Need to fail writes when row lock can't be acquired
Date Wed, 26 Nov 2014 21:40:12 GMT
Jeffrey Zhong created HBASE-12588:

             Summary: 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.99.1, 0.98.8
            Reporter: Jeffrey Zhong
            Assignee: Jeffrey Zhong

Currently we don't fail write operations when can't acquiring row locks as shown below in
        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 {

We saw this issue when there is meta corruption problem and checkRow fails with error:
org.apache.hadoop.hbase.regionserver.WrongRegionException: Requested row out of range for
row lock on HRegion

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

View raw message