HBASE-14893 Race between mutation on region and region closing operation leads to NotServingRegionException
This commit is contained in:
parent
b280a41ba6
commit
001eb0694a
|
@ -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
|
// block waiting for the lock for closing
|
||||||
lock.writeLock().lock();
|
lock.writeLock().lock();
|
||||||
|
this.closing.set(true);
|
||||||
|
status.setStatus("Disabling writes for close");
|
||||||
try {
|
try {
|
||||||
if (this.isClosed()) {
|
if (this.isClosed()) {
|
||||||
status.abort("Already got closed by another process");
|
status.abort("Already got closed by another process");
|
||||||
|
|
Loading…
Reference in New Issue