HBASE-9645 Regionserver halt because of HLogs "Logic Error Snapshot seq id from earlier flush still present"

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1535288 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2013-10-24 06:49:47 +00:00
parent bccd10de11
commit 5102aec6c0
1 changed files with 47 additions and 30 deletions

View File

@ -5610,4 +5610,21 @@ public class HRegion implements HeapSize { // , Writable{
} }
} }
} }
/**
* Lock the updates' readLock first, so that we could safely append logs in coprocessors.
* @throws RegionTooBusyException
* @throws InterruptedIOException
*/
public void updatesLock() throws RegionTooBusyException, InterruptedIOException {
lock(updatesLock.readLock());
}
/**
* Unlock the updates' readLock after appending logs in coprocessors.
* @throws InterruptedIOException
*/
public void updatesUnlock() throws InterruptedIOException {
updatesLock.readLock().unlock();
}
} }