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

Encapsulate the non-critical code to prevent core disaster #30398

Open
tangenta opened this issue Dec 3, 2021 · 0 comments
Open

Encapsulate the non-critical code to prevent core disaster #30398

tangenta opened this issue Dec 3, 2021 · 0 comments
Labels
sig/execution SIG execution sig/planner SIG: Planner sig/sql-infra SIG: SQL Infra type/enhancement The issue or PR belongs to an enhancement.

Comments

@tangenta
Copy link
Contributor

tangenta commented Dec 3, 2021

Enhancement

In #29925, we encountered an OOM issue caused by "printing a log". This is unexpected and the problems like this significantly decrease the stability and availability of TiDB.

Besides enhancing our tests, we had better mark the components/packages that are less critical, and encapsulate them with a proper recovery mechanism.

Less critical components:

  • Logging
  • Metrics
  • Query feedback
  • Memory tracker
  • Telemetry
  • Execdetails
  • TopSQL
  • Tracing

Possible recovery mechanisms:

  • Golang's recover()
  • Memory tracking
  • Context canceller

Some refactoring work may be involved to decouple these components from the core.

@tangenta tangenta added the type/enhancement The issue or PR belongs to an enhancement. label Dec 3, 2021
@bb7133 bb7133 added sig/sql-infra SIG: SQL Infra sig/execution SIG execution sig/planner SIG: Planner labels Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution sig/planner SIG: Planner sig/sql-infra SIG: SQL Infra type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

2 participants