HBASE-14893 Race between mutation on region and region closing operation leads to NotServingRegionException

This commit is contained in:
tedyu 2015-11-27 15:32:42 -08:00
parent 9a11c025f2
commit 9de4691a0a
1 changed files with 2 additions and 2 deletions

View File

@ -1403,10 +1403,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
}
}
this.closing.set(true);
status.setStatus("Disabling writes for close");
// block waiting for the lock for closing
lock.writeLock().lock();
this.closing.set(true);
status.setStatus("Disabling writes for close");
try {
if (this.isClosed()) {
status.abort("Already got closed by another process");