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

Recover time may be very long if TiKV enables hibernate region #34906

Closed
sticnarf opened this issue May 24, 2022 · 3 comments · Fixed by #35364
Closed

Recover time may be very long if TiKV enables hibernate region #34906

sticnarf opened this issue May 24, 2022 · 3 comments · Fixed by #35364
Assignees
Labels
affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.1 sig/transaction SIG:Transaction type/enhancement The issue or PR belongs to an enhancement.

Comments

@sticnarf
Copy link
Contributor

Enhancement

Considering one TiKV is unhealthy, all requests sending to that store will timeout. But due to hibernate region, the regions whose leaders are on the unhealthy store will not be re-elected until a request is sent to the follower.

If there are thousands of such regions, every time we are accessing a new region, it will send a request to the original leader on the unhealthy TiKV because the leader definitely does not change. And then, the user will always experience very long request duration until all regions are touched and elect new leaders.

We can use the health check service of TiKV to get the serving status of TiKV. By filtering out healthy nodes, we can recover from TiKV failure more quickly.

@sticnarf sticnarf added the type/enhancement The issue or PR belongs to an enhancement. label May 24, 2022
@sticnarf sticnarf self-assigned this May 24, 2022
@sticnarf sticnarf added affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.1 labels May 24, 2022
@windtalker
Copy link
Contributor

@sticnarf if it is an enhancement, we should not add affects-xxx label

@windtalker windtalker removed affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.1 labels May 24, 2022
@sticnarf sticnarf added affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.1 labels Jun 15, 2022
@sticnarf
Copy link
Contributor Author

It's allowed to backport small enhancements, according to internal discussions in PingCAP release teams.

@cfzjywxk
Copy link
Contributor

@sticnarf
Need a cherry-pick for the v6.1.1 release version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.1 sig/transaction SIG:Transaction type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants