Index: src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (revision 1529554) +++ src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (working copy) @@ -3417,6 +3417,23 @@ } /** + * 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(); + } + + /** * Obtain a lock on the given row. Blocks until success. * * I know it's strange to have two mappings: