HBASE-7376 Acquiring readLock does not apply timeout in HRegion#flushcache (binlijin)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1423551 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jxiang 2012-12-18 17:53:57 +00:00
parent 8aaff7c3d4
commit c001f73c37
1 changed files with 2 additions and 1 deletions

View File

@ -1403,7 +1403,8 @@ public class HRegion implements HeapSize { // , Writable{
} }
MonitoredTask status = TaskMonitor.get().createStatus("Flushing " + this); MonitoredTask status = TaskMonitor.get().createStatus("Flushing " + this);
status.setStatus("Acquiring readlock on region"); status.setStatus("Acquiring readlock on region");
lock(lock.readLock()); // block waiting for the lock for flushing cache
lock.readLock().lock();
try { try {
if (this.closed.get()) { if (this.closed.get()) {
LOG.debug("Skipping flush on " + this + " because closed"); LOG.debug("Skipping flush on " + this + " because closed");