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

remove mock.Context usage in production code #53388

Closed
lcwangchao opened this issue May 20, 2024 · 0 comments · Fixed by #53479 or #53721
Closed

remove mock.Context usage in production code #53388

lcwangchao opened this issue May 20, 2024 · 0 comments · Fixed by #53479 or #53721

Comments

@lcwangchao
Copy link
Collaborator

lcwangchao commented May 20, 2024

Enhancement

It's better to remove the mock.Context usages in TiDB production code. The reason is that mock.Context is not designed for production code. It is designed for testing, that means some values in it are not reasonable in production and some values will be modified by the developer without any care.

We can replace some code that uses mock.Context with some "static" context we introduced before such as StaticExprContext or DistSQLContext

Tasks

ti-chi-bot bot pushed a commit that referenced this issue May 28, 2024
…xpression context to handle truncate error (#53441)

ref #53388
@lcwangchao lcwangchao reopened this May 29, 2024
ti-chi-bot bot pushed a commit that referenced this issue May 29, 2024
ti-chi-bot bot pushed a commit that referenced this issue May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant