Skip to content
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

Merged
merged 3 commits into from
Jan 3, 2018

Conversation

disksing
Copy link
Contributor

@disksing disksing commented Jan 3, 2018

Fix some misuses of read/write flow.

  1. Here uses srcRegion.ReadBytes but the method will also be called by hot-write schedule.
  2. Use rs.FlowBytes instead of region.ReadBytes/region.WrittenBytes to participate in calculations.
  3. Some variable renames and function extractions.

srcStoreID = storeID
}
}
func (h *balanceHotRegionsScheduler) balanceByLeader(cluster schedule.Cluster, typ BalanceType, storesStat core.StoreHotRegionsStat) (*core.RegionInfo, *metapb.Peer) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the typ seems useless?

Copy link
Contributor Author

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.

Copy link
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@nolouch nolouch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants