-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HBASE-25847 More DEBUG and TRACE level logging in CatalogJanitor and HbckChore #3230
Conversation
@@ -223,15 +223,37 @@ private void loadRegionsFromInMemoryState() { | |||
.isTableState(regionInfo.getTable(), TableState.State.DISABLED)) { | |||
disabledTableRegions.add(regionInfo.getRegionNameAsString()); | |||
} | |||
if (regionInfo.isSplitParent()) { | |||
if (regionState.isSplit()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this patch is just more logging. This is a real bug fix, though. Right now it just affects logging (numbers printed in a debug log line) but if in the future code depends on splitParentRegions
to be properly populated, this will be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on this change.
Was always odd have a Regions' split state recorded in its RegionInfo; RegionInfo does not keep internally if it is being merged or if open, etc. Regions are manipulated by other entities so state belongs elsewhere. +1 on move to regionstate checking instead.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/janitor/CatalogJanitor.java
Show resolved
Hide resolved
hbase-server/src/main/java/org/apache/hadoop/hbase/master/janitor/CatalogJanitor.java
Show resolved
Hide resolved
Some background https://issues.apache.org/jira/browse/HBASE-24942 I've found a bug when refactoring CatalogJanitor because of we may clean the merge qualifiers in MergeTableRegionsProcedure. Theoretically we should only do this in GCRegion related procedures(as what you proposed here), but doing this in other places could speed up later process which could be blocked by merge qualifiers. For me I'm +1 on removing the redundant removal in CatalogJanitor, but let's wait for @saintstack 's opinon too? Thanks. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
The error is persistent and it is relevant
|
With these changes the ingestion test completes successfully and without weird artifacts in the logging. All split regions are GCed by procedures. In memory state aligns with filesystem state.
|
Well since what I want here is "More DEBUG and TRACE level logging" I will remove the additional changes so the test failure is fixed and address that on a separate PR. |
Just the logging changes now, and the bug fix to ensure log lines emit correct information. The CatalogJanitor cleanup proposal is now this PR: #3234 @virajjasani The next test report here should be good. |
🎊 +1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging makes sense to me..
@@ -165,13 +168,19 @@ public int scan() throws IOException { | |||
this.lastReport = scanForReport(); | |||
if (!this.lastReport.isEmpty()) { | |||
LOG.warn(this.lastReport.toString()); | |||
} else { | |||
LOG.debug(this.lastReport.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: toString() might be an expensive call if debug is not enabled, might want to switch to a isDebugEnabled() guard, (later versions of log4j supports log.debug(Object)/log.debug(Supplier) so that toString() is eventually evaluated after the debug guard check)..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used to abide by that guidance but I don't see that done often in new code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits in below
@@ -223,15 +223,37 @@ private void loadRegionsFromInMemoryState() { | |||
.isTableState(regionInfo.getTable(), TableState.State.DISABLED)) { | |||
disabledTableRegions.add(regionInfo.getRegionNameAsString()); | |||
} | |||
if (regionInfo.isSplitParent()) { | |||
if (regionState.isSplit()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on this change.
Was always odd have a Regions' split state recorded in its RegionInfo; RegionInfo does not keep internally if it is being merged or if open, etc. Regions are manipulated by other entities so state belongs elsewhere. +1 on move to regionstate checking instead.
@@ -165,13 +168,19 @@ public int scan() throws IOException { | |||
this.lastReport = scanForReport(); | |||
if (!this.lastReport.isEmpty()) { | |||
LOG.warn(this.lastReport.toString()); | |||
} else { | |||
LOG.debug(this.lastReport.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
hbase-server/src/main/java/org/apache/hadoop/hbase/master/janitor/CatalogJanitor.java
Show resolved
Hide resolved
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Added log level guards as requested before merge. |
…HbckChore (#3230) Signed-off-by: Bharath Vissapragada <bharathv@apache.org> Signed-off-by: Michael Stack <stack@apache.org>
…HbckChore (#3230) Signed-off-by: Bharath Vissapragada <bharathv@apache.org> Signed-off-by: Michael Stack <stack@apache.org>
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
No description provided.