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



##########
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:
       @huaxiangsun I've been thinking about this and haven't come to a formula 
that I like. So let me propose this: rather than basing this decision on a 
scaling factor, how about we decide on some arbitrary value to use as meaning 
"effectively 0" in size. Say, any region <= 10mb will be considered as 
"effectively 0-sized" and we'll merge it into it's neighbor when possible. I 
supposed we can make this configurable as well...
   
   What do you think?




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


Reply via email to