Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Oct 15, 2024
1 parent 91da17a commit 36845fa
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 14 deletions.
4 changes: 0 additions & 4 deletions pkg/mcs/scheduling/server/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,6 @@ func (c *Cluster) UpdateRegionsLabelLevelStats(regions []*core.RegionInfo) {
for _, region := range regions {
c.labelStats.Observe(region, c.getStoresWithoutLabelLocked(region, core.EngineKey, core.EngineTiFlash), c.persistConfig.GetLocationLabels())
}
}

// ClearDefunctRegionsLabelLevelStats clears the defunct regions' label level stats.
func (c *Cluster) ClearDefunctRegionsLabelLevelStats() {
c.labelStats.ClearDefunctRegions()
}

Expand Down
3 changes: 0 additions & 3 deletions pkg/mock/mockcluster/mockcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ func (mc *Cluster) AllocID() (uint64, error) {
// UpdateRegionsLabelLevelStats updates the label level stats for the regions.
func (*Cluster) UpdateRegionsLabelLevelStats(_ []*core.RegionInfo) {}

// ClearDefunctRegionsLabelLevelStats clears the defunct regions' label level stats.
func (*Cluster) ClearDefunctRegionsLabelLevelStats() {}

// LoadRegion puts region info without leader
func (mc *Cluster) LoadRegion(regionID uint64, peerStoreIDs ...uint64) {
// regions load from etcd will have no leader
Expand Down
2 changes: 0 additions & 2 deletions pkg/schedule/checker/checker_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ func (c *Controller) PatrolRegions() {
c.cluster.UpdateRegionsLabelLevelStats(regions)
// When the key is nil, it means that the scan is finished.
if len(key) == 0 {
// Clear the defunct regions label level statistics.
c.cluster.ClearDefunctRegionsLabelLevelStats()
// update the scan limit.
c.patrolRegionScanLimit = calculateScanLimit(c.cluster)
// update the metrics.
Expand Down
1 change: 0 additions & 1 deletion pkg/schedule/core/cluster_informer.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ type CheckerCluster interface {
GetCheckerConfig() sc.CheckerConfigProvider
GetStoreConfig() sc.StoreConfigProvider
UpdateRegionsLabelLevelStats(regions []*core.RegionInfo)
ClearDefunctRegionsLabelLevelStats()
}

// SharedCluster is an aggregate interface that wraps multiple interfaces
Expand Down
4 changes: 0 additions & 4 deletions server/cluster/scheduling_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,6 @@ func (sc *schedulingController) UpdateRegionsLabelLevelStats(regions []*core.Reg
for _, region := range regions {
sc.labelStats.Observe(region, sc.getStoresWithoutLabelLocked(region, core.EngineKey, core.EngineTiFlash), sc.opt.GetLocationLabels())
}
}

// ClearDefunctRegionsLabelLevelStats clears the status of the region label level by types.
func (sc *schedulingController) ClearDefunctRegionsLabelLevelStats() {
sc.labelStats.ClearDefunctRegions()
}

Expand Down

0 comments on commit 36845fa

Please sign in to comment.