hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject git commit: mutateRowsWithLocks might require updatesLock.readLock with waitTime=0. ( cuijianwei)
Date Thu, 31 Jul 2014 23:53:23 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 1441ec9c0 -> 1326d329e


mutateRowsWithLocks might require updatesLock.readLock with waitTime=0. ( cuijianwei)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/1326d329
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/1326d329
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/1326d329

Branch: refs/heads/master
Commit: 1326d329ee0f74dfd3c2c63cf9e5f062a2f7a579
Parents: 1441ec9
Author: Lars Hofhansl <larsh@apache.org>
Authored: Thu Jul 31 16:28:51 2014 -0700
Committer: Lars Hofhansl <larsh@apache.org>
Committed: Thu Jul 31 16:28:51 2014 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/regionserver/HRegion.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/1326d329/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 5714079..891c698 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -4992,7 +4992,7 @@ public class HRegion implements HeapSize { // , Writable{
         acquiredRowLocks.add(getRowLock(row));
       }
       // 3. Region lock
-      lock(this.updatesLock.readLock(), acquiredRowLocks.size());
+      lock(this.updatesLock.readLock(), acquiredRowLocks.size() == 0 ? 1 : acquiredRowLocks.size());
       locked = true;
       // Get a mvcc write number
       mvccNum = MultiVersionConsistencyControl.getPreAssignedWriteNumber(this.sequenceId);


Mime
View raw message