-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
NamedStmt.QueryRowContext() doesn't cancel query when context.DeadlineExceeded has occurred #745
Comments
I was able to recreate this in the std lib. Does anyone know why the stmt doesn't get canceled like with To clarify, example of this behavior
|
This actually may be an issue in |
This definitely seems to be in
I'll comment back here once I figure out the root cause. I'll probably have to switch to https://github.com/jackc/pgx anyway since |
Found it! Turns out |
I'm not certain if this is a bug (here or
database/sql
) or just me misusing this library. In any case, I'd like to callQueryRowContext()
and have it cancel the query when the context Deadline has been exceeded. This seems to not happen.go version:
go version go1.15.10 darwin/amd64
sqlx version:
v1.3.4
Example test case:
Any guidance would be appreciated.
The text was updated successfully, but these errors were encountered: