Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
database/sql: Context cancellation doesn't #18168
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
@j7b Hi Jake. I'm not sure how to respond to the last two paragraphs.
Let me address the cancelation expectation. The context can help in multiple locations: getting a free connection from the pool (there were multiple bugs open where a depleted pool could block forever), canceling a query during execution as you are testing above if the driver supports it (Please see https://docs.google.com/spreadsheets/d/1y7AzkFNPeTBado0xJJipB5MpWlcqylQg410Q5wHz2Ew/edit#gid=0 for implementation status, right now the driver you used doesn't support in-flight cancelation), it also help ensure connections are returned to the pool when you are done with it.
Yes, you still need a Begin() function, but if you implement BeginContext, your Begin function can be:
These issues and CLs have been active for many months. You can review the history of them if you'd like. I think you even commented on some of the issues.
I don't understand what you mean here at all:
Does it seem like core go members are disregarding community involvement? I'm unsure of your intent.
As far as I can tell, for the first issue you raised this is working as expected. I'll keep this open if you'd like to clarify some of your secondary comments.
The release notes (https://beta.golang.org/doc/go1.8#database_sql) do note that:
But https://beta.golang.org/pkg/database/sql/ lacks that documentation. Thanks for the report. We did try to clarify everywhere in the package docs where features weren't available if the underlying driver doesn't support it.
Yes, perhaps that could be clarified.
I'm not sure whether you intended for that to come across as passive aggressive. If you'd like to get involved in code reviews (https://golang.org/doc/contribute.html), or the proposal process (https://github.com/golang/proposal), you're certainly welcome. Even this process now with betas is part of a process (https://github.com/golang/go/wiki/Go-Release-Cycle). And we have a final-final API review every 6 months (e.g. https://groups.google.com/forum/#!topic/golang-dev/t5rvbW6OK9U, which generated feedback, as it tends to) before we lock in the API for later (https://golang.org/doc/go1compat). If you find any of our process flawed, please file a separate bug, and let's keep this bug about database/sql.
In any case, we'll work on the docs.
Thanks for the report.