-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[raftstore-v2]: check apply_scheduler before using in on_refresh_region_buckets #14526
Conversation
Signed-off-by: tonyxuqqi <tonyxuqi@outlook.com>
[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. |
@@ -148,6 +148,7 @@ impl<EK: KvEngine, ER: RaftEngine> Peer<EK, ER> { | |||
.apply_pool | |||
.spawn(async move { apply_fsm.handle_all_tasks().await }) | |||
.unwrap(); | |||
fail::fail_point!("deplay_set_apply_scheduler", |_| {}); | |||
self.set_apply_scheduler(apply_scheduler); |
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.
Why not set it before spawning?
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.
Why not set it before spawning?
Is there any benefit to put it before spawning? The spawning itself is not going to take long time either.
The key here is to delay the set_apply_scheduler being called, so making this fail_point just prior to it is more precise. Though, in fact the delay could happen at any place when the OS thread is switched.
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.
Forget it, I thought it's a race between Apply::handle_all_tasks
.
Co-authored-by: buffer <doufuxiaowangzi@gmail.com> Signed-off-by: tonyxuqqi <tonyxuqi@outlook.com>
/test |
1 similar comment
/test |
/merge |
@tonyxuqqi: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. 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. |
This pull request has been accepted and is ready to merge. Commit hash: 66012f7
|
/test |
What is changed and how it works?
Issue Number: Close #14506
What's Changed:
Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Release note