Skip to content

Commit

Permalink
core: remove the overlaps logic in UpdateSubTree
Browse files Browse the repository at this point in the history
Signed-off-by: nolouch <nolouch@gmail.com>
  • Loading branch information
nolouch committed Apr 29, 2024
1 parent aae410f commit f3fc769
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pkg/core/region.go
Original file line number Diff line number Diff line change
Expand Up @@ -1106,13 +1106,7 @@ func (r *RegionsInfo) UpdateSubTreeOrderInsensitive(region *RegionInfo) {
}
}

if rangeChanged {
overlaps := r.getOverlapRegionFromSubTreeLocked(region)
for _, re := range overlaps {
r.removeRegionFromSubTreeLocked(re)
}
}

// update will remove overlaps
item := &regionItem{region}
r.subRegions[region.GetID()] = item
// It has been removed and all information needs to be updated again.
Expand Down

0 comments on commit f3fc769

Please sign in to comment.