-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Racy context cancellation #745
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
Comments
Note that In short, there are still races with |
Good point, will put comment about it. (DONE). |
@mattn, @gjrtimmer do you still maintain this repo? |
Current cancellation approach have couple racy cases. I propose PR to fix them:
#744
Issues details.
This is rare case but it happen in our production environment sometimes. It causes next query executed on same connection to get "interrupted" error when its context was not cancelled.
See
TestQueryRowContextCancelParallel
in PR, it should reproduces issue almost always.Because we close rows ourselves, rows.Next() returns io.EOF which is used by "sql" package both for rows.Next() and rows.Err() results.
See
TestQueryRowContextCancel
in PR.The text was updated successfully, but these errors were encountered: