Skip to content

Commit

Permalink
scheduler: log all divergent routines when filtering the target store (
Browse files Browse the repository at this point in the history
…#1614)

Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>
  • Loading branch information
shafreeck authored and nolouch committed Jul 4, 2019
1 parent f0c5c9d commit 0cbcd4c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions server/schedulers/balance_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,29 @@ func (s *balanceRegionScheduler) hasPotentialTarget(cluster schedule.Cluster, re

for _, store := range cluster.GetStores() {
if schedule.FilterTarget(cluster, store, filters) {
log.Debug("skip target store by filters",
zap.String("scheduler", s.GetName()),
zap.Uint64("region", region.GetID()),
zap.Uint64("source", source.GetID()),
zap.Uint64("target", store.GetID()))
continue
}
if !store.IsUp() || store.DownTime() > cluster.GetMaxStoreDownTime() {
log.Debug("skip target store by status",
zap.String("scheduler", s.GetName()),
zap.Uint64("region", region.GetID()),
zap.Uint64("source", source.GetID()),
zap.Uint64("target", store.GetID()),
zap.Bool("isup", store.IsUp()),
zap.Duration("downtime", store.DownTime()))
continue
}
if !shouldBalance(cluster, source, store, region, core.RegionKind, opInfluence) {
log.Debug("skip target store for it should not balance",
zap.String("scheduler", s.GetName()),
zap.Uint64("region", region.GetID()),
zap.Uint64("source", source.GetID()),
zap.Uint64("target", store.GetID()))
continue
}
return true
Expand Down

0 comments on commit 0cbcd4c

Please sign in to comment.