HBASE-4077 Deadlock if WrongRegionException is thrown from getLock in

HRegion.delete (Adam Warrington via Ted Yu)


git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1144054 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2011-07-07 21:33:11 +00:00
parent d0e28d0309
commit cf5b80c2ee
2 changed files with 9 additions and 5 deletions

View File

@ -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)

View File

@ -1349,12 +1349,14 @@ public class HRegion implements HeapSize { // , Writable{
// 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();
}
}