Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: nolouch <nolouch@gmail.com>
  • Loading branch information
nolouch committed Jul 14, 2021
1 parent 6b92c10 commit a722bfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
15 changes: 2 additions & 13 deletions server/schedule/operator/kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,6 @@ type OpKind uint32

// Flags for operators.
const (
<<<<<<< HEAD
OpLeader OpKind = 1 << iota // Include leader transfer.
OpRegion // Include peer movement.
OpSplit // Include region split.
OpAdmin // Initiated by admin.
OpHotRegion // Initiated by hot region scheduler.
OpAdjacent // Initiated by adjacent region scheduler.
OpReplica // Initiated by replica checkers.
OpBalance // Initiated by balancers.
OpMerge // Initiated by merge checkers or merge schedulers.
OpRange // Initiated by range scheduler.
=======
// Initiated by merge checker or merge scheduler. Note that it may not include region merge.
// the order describe the operator's producer and is very helpful to decouple scheduler or checker limit
OpMerge OpKind = 1 << iota
Expand All @@ -51,9 +39,10 @@ const (
OpRegion
// Include leader transfer.
OpLeader
OpBalance
OpAdjacent
// Initiated by admin.
OpAdmin
>>>>>>> e05892721 (schedule: one operator only occupy one limit (#3820))
opMax
)

Expand Down
6 changes: 1 addition & 5 deletions server/schedulers/balance_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,7 @@ func (s *balanceRegionScheduler) EncodeConfig() ([]byte, error) {
}

func (s *balanceRegionScheduler) IsScheduleAllowed(cluster opt.Cluster) bool {
<<<<<<< HEAD
allowed := s.opController.OperatorCount(operator.OpRegion)-s.opController.OperatorCount(operator.OpMerge) < cluster.GetRegionScheduleLimit()
=======
allowed := s.opController.OperatorCount(operator.OpRegion) < cluster.GetOpts().GetRegionScheduleLimit()
>>>>>>> e05892721 (schedule: one operator only occupy one limit (#3820))
allowed := s.opController.OperatorCount(operator.OpRegion) < cluster.GetRegionScheduleLimit()
if !allowed {
operator.OperatorLimitCounter.WithLabelValues(s.GetType(), operator.OpRegion.String()).Inc()
}
Expand Down

0 comments on commit a722bfb

Please sign in to comment.