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/07/13 16:03:07 UTC

[GitHub] [hbase] mnpoonia commented on a change in pull request #1922: HBASE-24583 Normalizer can't actually merge empty regions when neighbor is larger than average size

mnpoonia commented on a change in pull request #1922:
URL: https://github.com/apache/hbase/pull/1922#discussion_r453759449



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
##########
@@ -369,7 +369,8 @@ private boolean skipForMerge(final RegionStates regionStates, final RegionInfo r
       }
       final long currentSizeMb = getRegionSizeMB(current);
       final long nextSizeMb = getRegionSizeMB(next);
-      if (currentSizeMb + nextSizeMb < avgRegionSizeMb) {
+      // always merge away empty regions when they present themselves.
+      if (currentSizeMb == 0 || nextSizeMb == 0 || currentSizeMb + nextSizeMb < avgRegionSizeMb) {

Review comment:
       I think this is good enough considering if region is empty it is in KB's as per my experience(i can be wrong here). One issue is if there are few rows which are yet to expire then the probability of next region to be more than avgRegionSize is also low but ofcourse possible. Silver lline is eventually we will merge it maybe in 2-3 weeks.




----------------------------------------------------------------
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