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:05 -08:00
parent b280a41ba6
commit 001eb0694a
1 changed files with 2 additions and 2 deletions

View File

@ -1401,10 +1401,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");