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 May 8, 2024
1 parent 6c221cc commit 0c2952d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
3 changes: 0 additions & 3 deletions pkg/schedule/schedulers/hot_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,6 @@ func (bs *balanceSolver) createOperator(region *core.RegionInfo, srcStoreID, dst
return
}

<<<<<<< HEAD
func (bs *balanceSolver) createWriteOperator(region *core.RegionInfo, srcStoreID, dstStoreID uint64) (op *operator.Operator, typ string, err error) {

Check failure on line 1711 in pkg/schedule/schedulers/hot_region.go

View workflow job for this annotation

GitHub Actions / statics

func `(*balanceSolver).createWriteOperator` is unused (unused)
if region.GetStorePeer(dstStoreID) != nil {
typ = "transfer-leader"
Expand All @@ -1735,8 +1734,6 @@ func (bs *balanceSolver) createWriteOperator(region *core.RegionInfo, srcStoreID
return
}

=======
>>>>>>> 33ae3b614 (scheduler: use move-hot-write-leader operator (#7852))
func (bs *balanceSolver) decorateOperator(op *operator.Operator, isRevert bool, sourceLabel, targetLabel, typ, dim string) {
op.SetPriorityLevel(constant.High)
op.FinishedCounters = append(op.FinishedCounters,
Expand Down
22 changes: 1 addition & 21 deletions pkg/schedule/schedulers/hot_region_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,23 +196,6 @@ func checkGCPendingOpInfos(re *require.Assertions, enablePlacementRules bool) {
}
}

<<<<<<< HEAD
func newTestRegion(id uint64) *core.RegionInfo {
peers := []*metapb.Peer{{Id: id*100 + 1, StoreId: 1}, {Id: id*100 + 2, StoreId: 2}, {Id: id*100 + 3, StoreId: 3}}
return core.NewRegionInfo(&metapb.Region{Id: id, Peers: peers}, peers[0])
}

func TestHotWriteRegionScheduleByteRateOnly(t *testing.T) {
re := require.New(t)
statistics.Denoising = false
statistics.HistorySampleDuration = 0
statisticsInterval = 0
checkHotWriteRegionScheduleByteRateOnly(re, false /* disable placement rules */)
checkHotWriteRegionScheduleByteRateOnly(re, true /* enable placement rules */)
}

=======
>>>>>>> 33ae3b614 (scheduler: use move-hot-write-leader operator (#7852))
func TestSplitIfRegionTooHot(t *testing.T) {
re := require.New(t)
statistics.Denoising = false
Expand Down Expand Up @@ -401,12 +384,11 @@ func TestSplitBucketsByLoad(t *testing.T) {
}
}

<<<<<<< HEAD
=======
func TestHotWriteRegionScheduleByteRateOnly(t *testing.T) {
re := require.New(t)
statistics.Denoising = false
statisticsInterval = 0
statistics.HistorySampleDuration = 0
checkHotWriteRegionScheduleByteRateOnly(re, false /* disable placement rules */)
checkHotWriteRegionScheduleByteRateOnly(re, true /* enable placement rules */)
checkHotWriteRegionPlacement(re, true)
Expand All @@ -422,7 +404,6 @@ func checkHotWriteRegionPlacement(re *require.Assertions, enablePlacementRules b
tc.SetMaxReplicasWithLabel(enablePlacementRules, 3, labels...)
hb, err := CreateScheduler(utils.Write.String(), oc, storage.NewStorageWithMemoryBackend(), nil)
re.NoError(err)
hb.(*hotScheduler).conf.SetHistorySampleDuration(0)
tc.SetHotRegionCacheHitsThreshold(0)

tc.AddLabelsStore(1, 2, map[string]string{"zone": "z1", "host": "h1"})
Expand Down Expand Up @@ -466,7 +447,6 @@ func checkHotWriteRegionPlacement(re *require.Assertions, enablePlacementRules b
re.NotContains(ops[0].Step(1).String(), "transfer leader")
}

>>>>>>> 33ae3b614 (scheduler: use move-hot-write-leader operator (#7852))
func checkHotWriteRegionScheduleByteRateOnly(re *require.Assertions, enablePlacementRules bool) {
cancel, opt, tc, oc := prepareSchedulersTest()
defer cancel()
Expand Down

0 comments on commit 0c2952d

Please sign in to comment.