-
Notifications
You must be signed in to change notification settings - Fork 728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scheduler: fix hot region scheduler select store problem. #898
Conversation
server/schedulers/hot_region.go
Outdated
srcStoreID = storeID | ||
} | ||
} | ||
func (h *balanceHotRegionsScheduler) balanceByLeader(cluster schedule.Cluster, typ BalanceType, storesStat core.StoreHotRegionsStat) (*core.RegionInfo, *metapb.Peer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the typ
seems useless?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aha, right. Forgot to clean it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fix some misuses of read/write flow.
srcRegion.ReadBytes
but the method will also be called by hot-write schedule.rs.FlowBytes
instead ofregion.ReadBytes
/region.WrittenBytes
to participate in calculations.