HBASE-22828 Log a region close journal (#471)

Signed-off-by: Michael Stack <stack@apache.org>
Signed-off-by: Reid Chan <reidchan@apache.org>
This commit is contained in:
Andrew Purtell 2019-08-13 15:42:41 -07:00
parent 6444158b79
commit e27ef92e3f
No known key found for this signature in database
GPG Key ID: 8597754DD5365CCD
1 changed files with 4 additions and 1 deletions

View File

@ -1508,13 +1508,16 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
MonitoredTask status = TaskMonitor.get().createStatus(
"Closing region " + this.getRegionInfo().getEncodedName() +
(abort ? " due to abort" : ""));
status.enableStatusJournal(false);
status.setStatus("Waiting for close lock");
try {
synchronized (closeLock) {
return doClose(abort, status);
}
} finally {
if (LOG.isDebugEnabled()) {
LOG.debug("Region close journal:\n" + status.prettyPrintJournal());
}
status.cleanup();
}
}