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

Timeout support for MySQL and Postgres channel #4760

Open
sunng87 opened this issue Sep 23, 2024 · 4 comments
Open

Timeout support for MySQL and Postgres channel #4760

sunng87 opened this issue Sep 23, 2024 · 4 comments
Labels
C-feature Category Features help wanted Extra attention is needed

Comments

@sunng87
Copy link
Member

sunng87 commented Sep 23, 2024

What problem does the new feature solve?

Add variables to MySQL and Postgres for controlling statement execution timeout.

This is also a compatibility requirement from Sigma.

What does the feature do?

For MySQL protocol, we need to support SET MAX_EXECUTION_TIME = 5000: https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html#sysvar_max_execution_time

For Postgres protocol, we need to support SET statement_timeout TO 5000: https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-STATEMENT-TIMEOUT

Implementation challenges

No response

@sunng87 sunng87 added C-feature Category Features help wanted Extra attention is needed labels Sep 23, 2024
@lyang24
Copy link
Contributor

lyang24 commented Oct 1, 2024

This looks interesting. I wonder are timeout settings per session? I am trying to measure the scope of the work, do we have similar session variable implementation examples on the codebase?

@sunng87
Copy link
Member Author

sunng87 commented Oct 1, 2024

@lyang24 good to hear. Yes this variable is session-scoped like our time zone setting. You can check src/session/src/lib.rs as the start for timezone impl, including how we set and how we use it.

@lyang24
Copy link
Contributor

lyang24 commented Oct 1, 2024

Thanks for the code pointers. may i take this issue?

@sunng87
Copy link
Member Author

sunng87 commented Oct 1, 2024

Sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category Features help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants