Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Aug 7, 2023
1 parent 80ed204 commit 2ece802
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 33 deletions.
31 changes: 3 additions & 28 deletions pkg/schedule/schedulers/hot_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,23 +439,14 @@ func isAvailableV1(s *solution) bool {
}

type balanceSolver struct {
<<<<<<< HEAD
schedule.Cluster
sche *hotScheduler
stLoadDetail map[uint64]*statistics.StoreLoadDetail
filteredHotPeers map[uint64][]*statistics.HotPeerStat // storeID -> hotPeers(filtered)
nthHotPeer map[uint64][]*statistics.HotPeerStat // storeID -> [dimLen]hotPeers
rwTy statistics.RWType
opTy opType
resourceTy resourceType
=======
sche.SchedulerCluster
sche *hotScheduler
stLoadDetail map[uint64]*statistics.StoreLoadDetail
filteredHotPeers map[uint64][]*statistics.HotPeerStat // storeID -> hotPeers(filtered)
nthHotPeer map[uint64][]*statistics.HotPeerStat // storeID -> [dimLen]hotPeers
rwTy statistics.RWType
opTy opType
resourceTy resourceType
>>>>>>> 16926ad89 (scheduler: make hot v2 more suitable small hot region (#6827))

cur *solution

Expand Down Expand Up @@ -497,7 +488,7 @@ func (bs *balanceSolver) init() {
// Load the configuration items of the scheduler.
bs.resourceTy = toResourceType(bs.rwTy, bs.opTy)
bs.maxPeerNum = bs.sche.conf.GetMaxPeerNumber()
bs.minHotDegree = bs.GetSchedulerConfig().GetHotRegionCacheHitsThreshold()
bs.minHotDegree = bs.GetOpts().GetHotRegionCacheHitsThreshold()
bs.firstPriority, bs.secondPriority = prioritiesToDim(bs.getPriorities())
bs.greatDecRatio, bs.minorDecRatio = bs.sche.conf.GetGreatDecRatio(), bs.sche.conf.GetMinorDecRatio()
bs.isRaftKV2 = bs.GetStoreConfig().IsRaftKV2()
Expand Down Expand Up @@ -543,22 +534,6 @@ func (bs *balanceSolver) init() {
Loads: stepLoads,
Count: maxCur.Count * bs.sche.conf.GetCountRankStepRatio(),
}
<<<<<<< HEAD

bs.firstPriority, bs.secondPriority = prioritiesToDim(bs.getPriorities())
bs.greatDecRatio, bs.minorDecRatio = bs.sche.conf.GetGreatDecRatio(), bs.sche.conf.GetMinorDecRatio()
bs.maxPeerNum = bs.sche.conf.GetMaxPeerNumber()
bs.minHotDegree = bs.GetOpts().GetHotRegionCacheHitsThreshold()
bs.isRaftKV2 = bs.GetStoreConfig().IsRaftKV2()

switch bs.sche.conf.GetRankFormulaVersion() {
case "v1":
bs.initRankV1()
default:
bs.initRankV2()
}
=======
>>>>>>> 16926ad89 (scheduler: make hot v2 more suitable small hot region (#6827))
}

func (bs *balanceSolver) initRankV1() {
Expand Down
7 changes: 2 additions & 5 deletions pkg/schedule/schedulers/hot_region_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ import (

"github.com/docker/go-units"
"github.com/stretchr/testify/require"
<<<<<<< HEAD
"github.com/tikv/pd/pkg/schedule"
=======
"github.com/tikv/pd/pkg/mock/mockcluster"
>>>>>>> 16926ad89 (scheduler: make hot v2 more suitable small hot region (#6827))
"github.com/tikv/pd/pkg/schedule"
"github.com/tikv/pd/pkg/schedule/operator"
"github.com/tikv/pd/pkg/statistics"
"github.com/tikv/pd/pkg/storage"
Expand Down Expand Up @@ -439,7 +436,7 @@ func checkHotReadRegionScheduleWithSmallHotRegion(re *require.Assertions, highLo
cancel, _, tc, oc := prepareSchedulersTest()
defer cancel()
statistics.Denoising = false
sche, err := CreateScheduler(statistics.Read.String(), oc, storage.NewStorageWithMemoryBackend(), nil, nil)
sche, err := schedule.CreateScheduler(statistics.Read.String(), oc, storage.NewStorageWithMemoryBackend(), nil)
re.NoError(err)
hb := sche.(*hotScheduler)
hb.conf.SetSrcToleranceRatio(1)
Expand Down

0 comments on commit 2ece802

Please sign in to comment.