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

schedule: add options to disable replica checker features #1140

Merged
merged 5 commits into from
Jul 10, 2018

Conversation

disksing
Copy link
Contributor

@disksing disksing commented Jul 5, 2018

What have you changed? (required)

Add 5 new options to turn on/off features of replicaChecker:

  • disable-remove-down-replica
  • disable-replace-offline-replica
  • disable-make-up-replica
  • disable-remove-extra-replica
  • disable-location-replacement

What are the type of the changes (required)?

  • Improvement (non-breaking change which is an improvement to an existing feature)

How has this PR been tested (required)?

  • unit tests
  • make sure it works on a local cluster

Does this PR affect documentation (docs/docs-cn) update? (optional)

pingcap/docs-cn#796

Refer to a related PR or issue link (optional)

Benchmark result if necessary (optional)

Add a few positive/negative examples (optional)

@nolouch
Copy link
Contributor

nolouch commented Jul 5, 2018

why need to do this change?

@disksing
Copy link
Contributor Author

disksing commented Jul 5, 2018

@nolouch In some scenarios, we need PD to handle specific types of tasks as quickly as possible. These options allow us to control the process meticulously, rather than let PD decide what to do.

@@ -172,6 +176,10 @@ func (r *ReplicaChecker) checkDownPeer(region *core.RegionInfo) *Operator {
}

func (r *ReplicaChecker) checkOfflinePeer(region *core.RegionInfo) *Operator {
if !r.cluster.IsMakeUpOfflineReplicaEnabled() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems makeup in here not very suitable. maybe check or replace?

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

@disksing
Copy link
Contributor Author

PTAL @nolouch

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.

None yet

3 participants