Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,7 @@ long initialize(final CancelableProgressable reporter) throws IOException {
}

MonitoredTask status = TaskMonitor.get().createStatus("Initializing region " + this);
status.enableStatusJournal(true);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will produce a journal entry with null status like

regionserver.HRegion: Region open journal:
null at 1592977559739
Running coprocessor pre-open hook at 1592977559739
Writing region info on filesystem at 1592977559739
...

I'm not sure this Is your intention. it looks weird for me. seems better to have meaningful status string.

long nextSeqId = -1;
try {
nextSeqId = initializeRegionInternals(reporter, status);
Expand Down Expand Up @@ -939,6 +940,10 @@ long initialize(final CancelableProgressable reporter) throws IOException {
status.abort("Exception during region " + getRegionInfo().getRegionNameAsString() +
" initialization.");
}
if (LOG.isDebugEnabled()) {
LOG.debug("Region open journal:\n" + status.prettyPrintJournal());
}
status.cleanup();
}
}

Expand Down Expand Up @@ -1545,7 +1550,7 @@ public Map<byte[], List<HStoreFile>> close(boolean abort) throws IOException {
MonitoredTask status = TaskMonitor.get().createStatus(
"Closing region " + this.getRegionInfo().getEncodedName() +
(abort ? " due to abort" : ""));
status.enableStatusJournal(false);
status.enableStatusJournal(true);
status.setStatus("Waiting for close lock");
try {
synchronized (closeLock) {
Expand Down