huaxiangsun commented on a change in pull request #1584:
URL: https://github.com/apache/hbase/pull/1584#discussion_r421798046



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MetaFixer.java
##########
@@ -242,17 +243,35 @@ void fixOverlaps(CatalogJanitor.Report report) throws 
IOException {
     }
     List<SortedSet<RegionInfo>> merges = new ArrayList<>();
     SortedSet<RegionInfo> currentMergeSet = new TreeSet<>();
+    HashSet<RegionInfo> regionsInMergeSet = new HashSet<>();
     RegionInfo regionInfoWithlargestEndKey =  null;
     for (Pair<RegionInfo, RegionInfo> pair: overlaps) {
       if (regionInfoWithlargestEndKey != null) {
         if (!isOverlap(regionInfoWithlargestEndKey, pair) ||
             currentMergeSet.size() >= maxMergeCount) {
-          merges.add(currentMergeSet);
-          currentMergeSet = new TreeSet<>();
+          if (currentMergeSet.size() <= 1) {

Review comment:
       added comments.




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