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

extend the semantics of tidb_mem_quota_query #38429

Closed
XuHuaiyu opened this issue Oct 12, 2022 · 0 comments · Fixed by #38423
Closed

extend the semantics of tidb_mem_quota_query #38429

XuHuaiyu opened this issue Oct 12, 2022 · 0 comments · Fixed by #38423
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@XuHuaiyu
Copy link
Contributor

Enhancement

tidb_mem_quota_query indicates the memory usage threshold of a query. But it's not applicable when SQL is in a transaction. During the execution of the transaction, different SQL will access the same memBuffer, and the memory of memBuffer will be released after commit or rollback. The memory usage of memBuffer should be accumulated to the memory tracker of a session but not a query.
We need to extend the semantics of tidb_mem_quota_query. The new definition is the memory usage threshold of a session. Actually, the new definition is more intuitive. For a query that is not in a transaction, there is no difference when the memory usage touches the threshold.

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
Development

Successfully merging a pull request may close this issue.

1 participant