hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1144060 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Date Thu, 07 Jul 2011 21:39:14 GMT
Author: tedyu
Date: Thu Jul  7 21:39:13 2011
New Revision: 1144060

URL: http://svn.apache.org/viewvc?rev=1144060&view=rev
Log:
HBASE-4077  Deadlock if WrongRegionException is thrown from getLock in HRegion.delete

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

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1144060&r1=1144059&r2=1144060&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Thu Jul  7 21:39:13 2011
@@ -63,6 +63,8 @@ Release 0.90.4 - Unreleased
                AssignmentManager.servers again (Jieshan Bean)
    HBASE-4074  When a RS has hostname with uppercase letter, there are two RS
                entries in master (Weihua Jiang via Ted Yu)
+   HBASE-4077  Deadlock if WrongRegionException is thrown from getLock in HRegion.delete
+               (Adam Warrington via Ted Yu)
 
   IMPROVEMENT
    HBASE-3882  hbase-config.sh needs to be updated so it can auto-detects the

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1144060&r1=1144059&r2=1144060&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Thu
Jul  7 21:39:13 2011
@@ -1169,12 +1169,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