-
Notifications
You must be signed in to change notification settings - Fork 252
Support probe tiflash status (#2619) #2635
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
Support probe tiflash status (#2619) #2635
Conversation
Signed-off-by: ti-chi-bot <[email protected]>
[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. |
/run-all-tests |
/run-all-tests |
8016a0e
/run-all-tests |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 8016a0e
|
This is an automated cherry-pick of #2619
What problem does this PR solve?
Support probe TiFlash status.
When you have two TiFlash and suspend one during the job, the suspended TiFlash can still be chosen and the request to it will wait for a timeout for grpc. It wastes resources and affected the whole job's speed.
What is changed and how it works?
When we choose the TiFlash. we call the isalive to probe the status of TiFlash. If it is not ready, drop the task.
Alternatives
In this pr, a background thread poll will refresh the cache of TiFlash store status every time a region task has been generated. Then drop the task whose store is unavailable.
The cons are if there are many tasks, the thread poll will be distributed too much probe tasks.
Another way is to use a corn job to refresh the cache: