Skip to content

Commit

Permalink
scheduler: fix panic in grant hot region scheduler (#8934)
Browse files Browse the repository at this point in the history
close #8933

Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
  • Loading branch information
lhy1024 and ti-chi-bot[bot] authored Dec 19, 2024
1 parent ac59675 commit 7889b67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pkg/schedule/schedulers/grant_hot_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ func (s *grantHotRegionScheduler) transfer(cluster sche.SchedulerCluster, region
} else {
op, err = operator.CreateMovePeerOperator(s.GetName()+"-move", cluster, srcRegion, operator.OpRegion|operator.OpLeader, srcStore.GetID(), dstStore)
}
if err != nil {
log.Debug("fail to create grant hot leader operator", errs.ZapError(err))
return
}
op.SetPriorityLevel(constant.High)
return
}
2 changes: 1 addition & 1 deletion pkg/schedule/schedulers/hot_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ func (bs *balanceSolver) splitBucketsOperator(region *core.RegionInfo, keys [][]

op, err := operator.CreateSplitRegionOperator(desc, region, operator.OpSplit, pdpb.CheckPolicy_USEKEY, splitKeys)
if err != nil {
log.Error("fail to create split operator",
log.Debug("fail to create split operator",
zap.Stringer("resource-type", bs.resourceTy),
errs.ZapError(err))
return nil
Expand Down

0 comments on commit 7889b67

Please # to comment.