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

TiDB may get bootstrap failed when stats initialization is concurrent and TiDB cpu core number is big #52339

Closed
winoros opened this issue Apr 3, 2024 · 1 comment · Fixed by #52347
Labels
affects-7.5 severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@winoros
Copy link
Member

winoros commented Apr 3, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

If we set concurrently-init-stats = true in config and the TiDB node has a lot CPU cores and the table num is also big.
We may hit the write throttle threshold of the ristretto cache we are using.

And causing unexpected problems such TiDB crashed due to the concurrent map read&write

@winoros winoros added type/bug The issue is confirmed as a bug. affects-7.5 sig/planner SIG: Planner labels Apr 3, 2024
@winoros winoros changed the title TiDB may got bootstrap failed when stats initialization is concurrent and TiDB cpu core number is big TiDB may get bootstrap failed when stats initialization is concurrent and TiDB cpu core number is big Apr 3, 2024
@winoros
Copy link
Member Author

winoros commented Apr 9, 2024

The ristretto's official benchmark said that it can support 10+ million qps, much bigger than when we meet the throttle threshold.

There seems to be some unexpected heavy operation of the statistics.Table. Currently, I think it's the MemoryUsage API. It would be improved during code refactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant