You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2012/09/20 07:46:42 UTC
svn commit: r1387863 -
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Author: stack
Date: Thu Sep 20 05:46:42 2012
New Revision: 1387863
URL: http://svn.apache.org/viewvc?rev=1387863&view=rev
Log:
HBASE-6839 Operations may be executed without rowLock
Modified:
hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1387863&r1=1387862&r2=1387863&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Thu Sep 20 05:46:42 2012
@@ -2181,7 +2181,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, mutation.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";
@@ -3223,7 +3230,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