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

schedulers: split transfer-witness-leader's limit from balance-leader #5873

Merged
merged 3 commits into from
Jan 19, 2023

Conversation

ethercflow
Copy link
Member

ref #5638

Signed-off-by: Wenbo Zhang ethercflow@gmail.com

What problem does this PR solve?

Issue Number: ref #5638

What is changed and how does it work?

Separate the limit configuration of transfer-witness-leader and balance-leader. Otherwise, when the witness becomes the leader, the op could not be created in time because the quota was full. The client will return a backoff error: is_witness.

schedulers: split transfer-witness-leader's limit from balance-leader

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Code changes

  • Has configuration change

Side effects

  • None

Related changes

Release note

None

ref tikv#5638

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 18, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bufferflies
  • rleungx

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jan 18, 2023
ref tikv#5638

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
@codecov
Copy link

codecov bot commented Jan 19, 2023

Codecov Report

Base: 75.44% // Head: 75.36% // Decreases project coverage by -0.09% ⚠️

Coverage data is based on head (78aa274) compared to base (082fc6a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5873      +/-   ##
==========================================
- Coverage   75.44%   75.36%   -0.09%     
==========================================
  Files         341      341              
  Lines       34339    34336       -3     
==========================================
- Hits        25908    25876      -32     
- Misses       6205     6222      +17     
- Partials     2226     2238      +12     
Flag Coverage Δ
unittests 75.36% <100.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/schedule/operator/kind.go 100.00% <ø> (ø)
server/schedulers/transfer_witness_leader.go 81.39% <100.00%> (+3.13%) ⬆️
pkg/utils/metricutil/metricutil.go 82.75% <0.00%> (-10.35%) ⬇️
server/tso/local_allocator.go 64.86% <0.00%> (-6.76%) ⬇️
pkg/storage/kv/etcd_kv.go 72.22% <0.00%> (-3.18%) ⬇️
server/schedulers/random_merge.go 62.50% <0.00%> (-3.13%) ⬇️
pkg/dashboard/adapter/manager.go 79.31% <0.00%> (-2.30%) ⬇️
server/schedule/labeler/rules.go 87.50% <0.00%> (-2.28%) ⬇️
pkg/member/member.go 63.68% <0.00%> (-2.11%) ⬇️
pkg/election/leadership.go 73.19% <0.00%> (-2.07%) ⬇️
... and 18 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

ref tikv#5638

Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
operator.OperatorLimitCounter.WithLabelValues(s.GetType(), operator.OpLeader.String()).Inc()
}
return allowed
return true
Copy link
Contributor

Choose a reason for hiding this comment

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

no any limit?

Copy link
Member Author

@ethercflow ethercflow Jan 19, 2023

Choose a reason for hiding this comment

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

Because when the witness becomes the leader, it cannot provide read and write requests, which will trigger the client to enter backoff to retry. If the transfer cannot be made in time, the client will time out. In addition, the strategy of witness raft log gc has been changed to ensure that there are enough logs, so no snapshots need (and can't) to be generated during the transfer leader process.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 19, 2023
@ethercflow ethercflow requested review from disksing and removed request for rleungx January 19, 2023 06:17
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jan 19, 2023
@rleungx
Copy link
Member

rleungx commented Jan 19, 2023

/merge

@ti-chi-bot
Copy link
Member

@rleungx: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 78aa274

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 19, 2023
@ti-chi-bot ti-chi-bot merged commit 7ca1b9a into tikv:master Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants