[release-branch.go1.8] database/sql: do not exhaust connection pool on conn request timeout
Previously if a context was canceled while it was waiting for a connection request, that connection request would leak. To prevent this remove the pending connection request if the context is canceled and ensure no connection has been sent on the channel. This requires a change to how the connection requests are represented in the DB. Fixes #18995 Change-Id: I9a274b48b8f4f7ca46cdee166faa38f56d030852 Reviewed-on: https://go-review.googlesource.com/36563Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/36613Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing
Please register or sign in to comment