huaxiangsun commented on a change in pull request #1584:
URL: https://github.com/apache/hbase/pull/1584#discussion_r420234889
##########
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:
In the case of the merge set contains only 1 region or empty, we do not
need to submit this merge request as no merge is going to happen. I will update
the patch with comments to explain this case.
----------------------------------------------------------------
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]