huaxiangsun commented on a change in pull request #1719:
URL: https://github.com/apache/hbase/pull/1719#discussion_r426901856
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaFixer.java
##########
@@ -308,6 +314,75 @@ public void testOverlapWithSmallMergeCount() throws
Exception {
}
}
+ /**
+ * This test covers the case that one of merged parent regions is a merged
child region that
+ * has not been GCed but there is no reference files anymore. In this case,
it will kick off
+ * a GC procedure, but no merge will happen.
+ */
+ @Test
+ public void testMergeWithMergedChildRegion() throws Exception {
+ TableName tn = TableName.valueOf(this.name.getMethodName());
+ Table t = TEST_UTIL.createMultiRegionTable(tn, HConstants.CATALOG_FAMILY);
+ List<RegionInfo> ris =
MetaTableAccessor.getTableRegions(TEST_UTIL.getConnection(), tn);
+ assertTrue(ris.size() > 5);
+ HMaster services = TEST_UTIL.getHBaseCluster().getMaster();
+ CatalogJanitor cj = services.getCatalogJanitor();
+ cj.scan();
+ CatalogJanitor.Report report = cj.getLastReport();
+ assertTrue(report.isEmpty());
+ RegionInfo overlapRegion = makeOverlap(services, ris.get(1), ris.get(2));
+ Threads.sleep(10000);
Review comment:
Checked the code, it seems the sleep is not needed at all, as procedure
has been waited to complete.
----------------------------------------------------------------
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]