hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1388004 - /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Date Thu, 20 Sep 2012 12:56:46 GMT
Author: tedyu
Date: Thu Sep 20 12:56:46 2012
New Revision: 1388004

URL: http://svn.apache.org/viewvc?rev=1388004&view=rev
Log:
HBASE-6839 Operations may be executed without holding rowLock (Chunhui)


Modified:
    hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1388004&r1=1388003&r2=1388004&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Thu
Sep 20 12:56:46 2012
@@ -1825,7 +1825,14 @@ public class HRegion implements HeapSize
         // If we haven't got any rows in our batch, we should block to
         // get the next one.
         boolean shouldBlock = numReadyToWrite == 0;
-        Integer acquiredLockId = getLock(providedLockId, put.getRow(), shouldBlock);
+        Integer acquiredLockId = null;
+        try {
+          acquiredLockId = getLock(providedLockId, mutation.getRow(),
+              shouldBlock);
+        } catch (IOException ioe) {
+          LOG.warn("Failed getting lock in batch put, row="
+                  + Bytes.toStringBinary(mutation.getRow()), ioe);
+        }
         if (acquiredLockId == null) {
           // We failed to grab another lock
           assert !shouldBlock : "Should never fail to get lock when blocking";
@@ -2671,7 +2678,8 @@ public class HRegion implements HeapSize
           try {
             if (!existingLatch.await(this.rowLockWaitDuration,
                             TimeUnit.MILLISECONDS)) {
-                return null;
+              throw new IOException("Timed out on getting lock for row="
+                  + Bytes.toStringBinary(row));
             }
           } catch (InterruptedException ie) {
             // Empty



Mime
View raw message