hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1144054 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Date Thu, 07 Jul 2011 21:33:11 GMT
Author: tedyu
Date: Thu Jul  7 21:33:11 2011
New Revision: 1144054

URL: http://svn.apache.org/viewvc?rev=1144054&view=rev
Log:
HBASE-4077  Deadlock if WrongRegionException is thrown from getLock in
               HRegion.delete (Adam Warrington via Ted Yu)

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1144054&r1=1144053&r2=1144054&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Thu Jul  7 21:33:11 2011
@@ -156,6 +156,8 @@ Release 0.91.0 - Unreleased
                removed from cluster, master breaks down after restarting cluster.
    HBASE-4074  When a RS has hostname with uppercase letter, there are two
                RS entries in master (Weihua via Ted Yu)
+   HBASE-4077  Deadlock if WrongRegionException is thrown from getLock in
+               HRegion.delete (Adam Warrington via Ted Yu)
 
   IMPROVEMENTS
    HBASE-3290  Max Compaction Size (Nicolas Spiegelberg via Stack)  

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1144054&r1=1144053&r2=1144054&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Thu Jul  7
21:33:11 2011
@@ -1349,12 +1349,14 @@ public class HRegion implements HeapSize
       // If we did not pass an existing row lock, obtain a new one
       lid = getLock(lockid, row, true);
 
-      // All edits for the given row (across all column families) must happen atomically.
-      prepareDelete(delete);
-      delete(delete.getFamilyMap(), writeToWAL);
-
+      try {
+          // All edits for the given row (across all column families) must happen atomically.
+          prepareDelete(delete);
+          delete(delete.getFamilyMap(), writeToWAL);
+      } finally {
+          if(lockid == null) releaseRowLock(lid);
+      }
     } finally {
-      if(lockid == null) releaseRowLock(lid);
       closeRegionOperation();
     }
   }



Mime
View raw message