HBASE-2923 Deadlock between HRegion.internalFlushCache and close

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@986448 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jean-Daniel Cryans 2010-08-17 18:44:35 +00:00
parent 4dbf0c9b69
commit 625a079b73
2 changed files with 6 additions and 1 deletions

View File

@ -478,6 +478,7 @@ Release 0.21.0 - Unreleased
HBASE-2909 SoftValueSortedMap is broken, can generate NPEs
HBASE-2919 initTableReducerJob: Unused method parameter
(Libor Dener via Stack)
HBASE-2923 Deadlock between HRegion.internalFlushCache and close
IMPROVEMENTS
HBASE-1760 Cleanup TODOs in HTable

View File

@ -470,7 +470,7 @@ public class HRegion implements HeapSize { // , Writable{
*
* @throws IOException e
*/
public synchronized List<StoreFile> close(final boolean abort)
public List<StoreFile> close(final boolean abort)
throws IOException {
if (isClosed()) {
LOG.warn("Region " + this + " already closed");
@ -507,6 +507,10 @@ public class HRegion implements HeapSize { // , Writable{
this.closing.set(true);
try {
splitsAndClosesLock.writeLock().lock();
if (this.isClosed()) {
// SplitTransaction handles the null
return null;
}
LOG.debug("Updates disabled for region, no outstanding scanners on " + this);
try {
// Write lock means no more row locks can be given out. Wait on