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

PD Request from TiDB Should Honor Query max_execution_time #56753

Open
HaoW30 opened this issue Oct 21, 2024 · 1 comment
Open

PD Request from TiDB Should Honor Query max_execution_time #56753

HaoW30 opened this issue Oct 21, 2024 · 1 comment
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@HaoW30
Copy link
Contributor

HaoW30 commented Oct 21, 2024

Enhancement

Currently, TiDB queries are terminated when they exceed max_execution_time, but the PD requests generated by these queries, such as GetRegion calls, do not adhere to the same timeout constraint.

The default PD RPC timeout (3 seconds) is relatively long compared to the max_execution_time for time-sensitive OLTP workloads. In some cases, even after TiDB has terminated the queries, their PD requests continue to retry on the PD, leading to unnecessary resource consumption. In extreme scenarios, we've observed that PD can become overwhelmed by a flood of these retried requests from TiDB.

As an enhancement, PD requests like GetRegion calls should honor the same timeout as the originating TiDB queries, enforced via the Go context. This would ensure that resources consumed by PD RPC calls are promptly released when the parent queries are terminated.

@HaoW30 HaoW30 added the type/enhancement The issue or PR belongs to an enhancement. label Oct 21, 2024
@HaoW30
Copy link
Contributor Author

HaoW30 commented Oct 21, 2024

We have a similar ask for tso requests #51893

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

No branches or pull requests

1 participant