saintstack commented on a change in pull request #1584:
URL: https://github.com/apache/hbase/pull/1584#discussion_r419568153
##########
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:
This bit is hard to read. A comment on why <= 1?
----------------------------------------------------------------
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]