Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <admin@liudos.us>
  • Loading branch information
lhy1024 committed May 29, 2020
1 parent 7c89f09 commit 9c0f46b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/mock/mockoption/mockoption.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const (
defaultSchedulerMaxWaitingOperator = 3
defaultHotRegionCacheHitsThreshold = 3
defaultStrictlyMatchLabel = true
defaultLeaderSchedulePolicy = "size"
defaultLeaderSchedulePolicy = "size"
)

// ScheduleOptions is a mock of ScheduleOptions
Expand Down Expand Up @@ -250,6 +250,6 @@ func (mso *ScheduleOptions) IsNamespaceRelocationEnabled() bool {
}

// GetLeaderSchedulePolicy is to get leader schedule policy
func (mso *ScheduleOptions) GetLeaderSchedulePolicy() core.SchedulePolicy {
func (mso *ScheduleOptions) GetLeaderSchedulePolicy() core.SchedulePolicy {
return core.StringToSchedulePolicy(mso.LeaderSchedulePolicy)
}
2 changes: 1 addition & 1 deletion server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ const (
// hot region.
defaultHotRegionCacheHitsThreshold = 3
defaultSchedulerMaxWaitingOperator = 3
defaultLeaderSchedulePolicy = "size"
defaultLeaderSchedulePolicy = "size"
)

func (c *ScheduleConfig) adjust(meta *configMetaData) error {
Expand Down
2 changes: 1 addition & 1 deletion server/schedule/selector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ func (s *testSelectorSuite) TestScheduleConfig(c *C) {
testScheduleConfig(selector, stores, 2, 3)
s.tc.LeaderSchedulePolicy = core.BySize.String()
testScheduleConfig(selector, stores, 1, 4)
}
}
2 changes: 1 addition & 1 deletion server/schedulers/balance_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func (s *balanceRegionScheduler) hasPotentialTarget(cluster schedule.Cluster, re
continue
}
kind := core.NewScheduleKind(core.RegionKind, core.BySize)
if !shouldBalance(cluster, source, store, region, kind, opInfluence,s.GetName()) {
if !shouldBalance(cluster, source, store, region, kind, opInfluence, s.GetName()) {
continue
}
return true
Expand Down

0 comments on commit 9c0f46b

Please sign in to comment.