You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/05/18 21:24:21 UTC

[GitHub] [hbase] saintstack commented on a change in pull request #1734: HBASE-24376 MergeNormalizer is merging non-adjacent regions and causi…

saintstack commented on a change in pull request #1734:
URL: https://github.com/apache/hbase/pull/1734#discussion_r426900712



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/AbstractRegionNormalizer.java
##########
@@ -170,6 +170,8 @@ private static boolean skipForMerge(final RegionState state) {
         + "number of regions: {}",
       table, avgRegionSize, table, tableRegions.size());
 
+    // Sorting based on RegionInfo.COMPARATOR.
+    tableRegions.sort(RegionInfo.COMPARATOR);

Review comment:
       Duh

##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/MergeNormalizationPlan.java
##########
@@ -69,8 +69,11 @@ public String toString() {
   public void execute(Admin admin) {
     LOG.info("Executing merging normalization plan: " + this);
     try {
+      // Do not use force=true as corner cases can happen, non adjacent regions,
+      // merge with a merged child region with no GC done yet, it is going to
+      // cause all different issues.
       admin.mergeRegionsAsync(firstRegion.getEncodedNameAsBytes(),
-        secondRegion.getEncodedNameAsBytes(), true);
+        secondRegion.getEncodedNameAsBytes(), false);

Review comment:
       Great




----------------------------------------------------------------
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:
users@infra.apache.org