-
Notifications
You must be signed in to change notification settings - Fork 726
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
*: fix scheduling can not immediately start after transfer leader #4875
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Codecov Report
@@ Coverage Diff @@
## master #4875 +/- ##
==========================================
- Coverage 75.45% 75.40% -0.05%
==========================================
Files 298 297 -1
Lines 29532 29506 -26
==========================================
- Hits 22282 22250 -32
- Misses 5318 5328 +10
+ Partials 1932 1928 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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. BTW, do we need to triage this issue first to see which version it affects before merging it?
Done |
server/cluster/cluster.go
Outdated
@@ -746,6 +746,11 @@ func (c *RaftCluster) processReportBuckets(buckets *metapb.Buckets) error { | |||
return nil | |||
} | |||
|
|||
// IsPrepared return if the prepare checker is ready. |
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.
// IsPrepared return if the prepare checker is ready. | |
// IsPrepared returns true if the prepare checker is ready. |
@@ -812,7 +817,7 @@ func (c *RaftCluster) processRegionHeartbeat(region *core.RegionInfo) error { | |||
regionEventCounter.WithLabelValues("update_cache").Inc() | |||
} | |||
|
|||
if isNew { | |||
if !c.IsPrepared() && isNew { |
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.
Could we check the condition in the function collect
directly?
server/cluster/coordinator.go
Outdated
@@ -310,6 +311,9 @@ func (c *coordinator) runUntilStop() { | |||
} | |||
|
|||
func (c *coordinator) run() { | |||
failpoint.Inject("runSchedulerCheckInterval", func() { |
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.
Could we change the Ticker
instead of runSchedulerCheckInterval
? So we can keep runSchedulerCheckInterval
as a constant.
For example , re define the ticker after L317
failpoint.Inject("runSchedulerCheckInterval", func() {
ticker = time.NewTicker(100 * time.Millisecond)
})
@rleungx: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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. |
close tikv#4769 Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4967. |
close tikv#4769 Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4969. |
close tikv#4769 Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4970. |
close tikv#4769 Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4971. |
close tikv#4769 Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4972. |
close tikv#4769 Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4973. |
close tikv#4769 Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4974. |
) (#4969) close #4769, ref #4875 Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]>
) (#4974) close #4769, ref #4875 Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]>
) (#4970) close #4769, ref #4875 Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]>
) (#4967) close #4769, ref #4875 Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]>
) (#4973) close #4769, ref #4875 Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung [email protected]
What problem does this PR solve?
Issue Number: Close #4769.
What is changed and how does it work?
This PR uses the flag to distinguish if the region's heartbeat is new when transferring the PD leader.
Check List
Tests
Release note