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, #53721 or #56654
Closed

remove mock.Context usage in production code #53388

lcwangchao opened this issue May 20, 2024 · 0 comments · Fixed by #53479, #53721 or #56654
Labels
type/enhancement The issue or PR belongs to an enhancement.

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

@lcwangchao lcwangchao added the type/enhancement The issue or PR belongs to an enhancement. label May 20, 2024
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
@lcwangchao lcwangchao reopened this Jun 19, 2024
ti-chi-bot bot pushed a commit that referenced this issue Aug 19, 2024
ti-chi-bot bot pushed a commit that referenced this issue Sep 2, 2024
…d remove `PlanContext` dependency in lightning context (#55617)

ref #53388
ti-chi-bot bot pushed a commit that referenced this issue Sep 5, 2024
ti-chi-bot bot pushed a commit that referenced this issue Sep 9, 2024
ti-chi-bot bot pushed a commit that referenced this issue Sep 20, 2024
winoros pushed a commit to winoros/tidb that referenced this issue Sep 23, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in 1052a55 Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
1 participant