-
Notifications
You must be signed in to change notification settings - Fork 65
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
Context Deadline should be configurable #131
Comments
I don't think we need to have such a conservative defautl value for the query timeout, and it definitely should be configurable in the URL. It would also be good to make it consistent with the JDBC driver, which is a reference implementation. |
I have encountered this recently as well, and was quite surprised by this default. Would you be open to removing this default query timeout entirely and pushing that responsibility onto the user of the package? If a user would want to set a timeout or deadline on the query, they could just set that accordingly on the context that they pass in. |
We should already handle a timeout set in a context. The default timeout can be increased by changing the trino.DefaultQueryTimeout variable, but it's global, cannot be changed through the URL, and generally it's a poor design choice. I'd suggest increasing it significantly, and deprecate it first, just in case anyone is relying on it. |
@lorransr fyi. you can set query timeout by passing context like this. timeoutCtx, cancelQueryContext := context.WithTimeout(*c.CancelCtx, 120*time.Second)
defer cancelQueryContext()
rows, err := qh.Connection.QueryContext(timeoutCtx, query, |
I created this issue on usql. I found that for long queries the context deadline is kind of short and I believe it should be configurable. Is it possible? and does it makes sense?
The text was updated successfully, but these errors were encountered: