arshadmohammad commented on a change in pull request #2304:
URL: https://github.com/apache/hbase/pull/2304#discussion_r478627788
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/CatalogJanitor.java
##########
@@ -644,12 +644,17 @@ private RegionInfo metaTableConsistencyCheck(Result
metaTableRow) {
// If table is disabled, skip integrity check.
if (!isTableDisabled(ri)) {
if (isTableTransition(ri)) {
- // On table transition, look to see if last region was last in table
- // and if this is the first. Report 'hole' if neither is true.
// HBCK1 used to have a special category for missing start or end
keys.
// We'll just lump them in as 'holes'.
- if ((this.previous != null && !this.previous.isLast()) ||
!ri.isFirst()) {
- addHole(this.previous == null? RegionInfo.UNDEFINED:
this.previous, ri);
+
+ // This is a table transition. If this region is not first region,
report a hole.
+ if (!ri.isFirst()) {
+ addHole(RegionInfo.UNDEFINED, ri);
+ }
Review comment:
IMHO, else is not needed as both condition can happen at the same time
1. current table has hole due to first region missing
2. previous table has hole due to last region missing
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]