Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: nolouch <[email protected]>
  • Loading branch information
nolouch committed Jul 5, 2019
1 parent a6be4d6 commit b12c320
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions server/schedule/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,15 @@ func (f StoreStateFilter) FilterTarget(opt Options, store *core.StoreInfo) bool
return true
}

// only target consider the pending peers because pending more means the disk is slower.
if opt.GetMaxPendingPeerCount() > 0 && store.GetPendingPeerCount() > int(opt.GetMaxPendingPeerCount()) {
return true
}
if f.MoveRegion {
// only target consider the pending peers because pending more means the disk is slower.
if opt.GetMaxPendingPeerCount() > 0 && store.GetPendingPeerCount() > int(opt.GetMaxPendingPeerCount()) {
return true
}

if f.MoveRegion && f.filterMoveRegion(opt, store) {
return true
if f.filterMoveRegion(opt, store) {
return true
}
}
return false
}
Expand Down

0 comments on commit b12c320

Please sign in to comment.