hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ChiaPing Tsai (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-17131) Livelook in HRegion#processRowsWithLocks
Date Sun, 20 Nov 2016 09:58:58 GMT
ChiaPing Tsai created HBASE-17131:
-------------------------------------

             Summary: Livelook in HRegion#processRowsWithLocks
                 Key: HBASE-17131
                 URL: https://issues.apache.org/jira/browse/HBASE-17131
             Project: HBase
          Issue Type: Bug
            Reporter: ChiaPing Tsai


{code:title=HRegion.java|borderStyle=solid}
try {
      // STEP 2. Acquire the row lock(s)
      acquiredRowLocks = new ArrayList<RowLock>(rowsToLock.size());
      for (byte[] row : rowsToLock) {
        // Attempt to lock all involved rows, throw if any lock times out
        // use a writer lock for mixed reads and writes
        acquiredRowLocks.add(getRowLockInternal(row, false));
      }
      // STEP 3. Region lock
      lock(this.updatesLock.readLock(), acquiredRowLocks.size() == 0 ? 1 : acquiredRowLocks.size());
      locked = true;
      boolean success = false;
      long now = EnvironmentEdgeManager.currentTime();
      try {
{code}
We should lock all involved rows in the second try-finally. Otherwise, we won’t release
the previous locks if any subsequent lock times out.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message