-
Notifications
You must be signed in to change notification settings - Fork 18k
database/sql: confusing MaxIdleClosed statistic #27792
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
btw, it is not mentioned on https://golang.org/doc/go1.11 at all. @dmitshur do you update changelogs after the fact? Should I create a separate issue? |
The release notes only cover the most noteworthy changes or additions; it's not meant to be an exhaustive list of minor changes to the standard library. The package documentation is the place to find detailed information. |
I'll look at this. I just haven't had time yet.
…On Fri, Sep 21, 2018, 19:52 Bryan C. Mills ***@***.***> wrote:
CC @bradfitz <https://github.com/bradfitz> @kardianos
<https://github.com/kardianos> @kevinburke <https://github.com/kevinburke>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#27792 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAuFsRPPzY4ineTHQn89tQkhGuab40TEks5udaXzgaJpZM4WzxuV>
.
|
Great, thank you! |
@AlekSi I see how this happens. I don't have a solution yet. I'll continue working on it. |
Change https://golang.org/cl/138578 mentions this issue: |
Could get cherry-picked into a 1.11.x release? |
@gopherbot please open backport to 1.11 |
Backport issue(s) opened: #28325 (for 1.11). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
What version of Go are you using (
go version
)?Both Go 1.11 and the current tip. MaxIdleClosed is not available in Go 1.10.
What did you do?
https://github.com/AlekSi/go-sql-bugs/blob/master/issue27792_test.go
What did you expect to see?
{MaxOpenConnections:1 OpenConnections:0 InUse:0 Idle:0 WaitCount:0 WaitDuration:0s MaxIdleClosed:0 MaxLifetimeClosed:0}
{MaxOpenConnections:1 OpenConnections:1 InUse:0 Idle:1 WaitCount:0 WaitDuration:0s MaxIdleClosed:0 MaxLifetimeClosed:0}
What did you see instead?
{MaxOpenConnections:1 OpenConnections:0 InUse:0 Idle:0 WaitCount:0 WaitDuration:0s MaxIdleClosed:0 MaxLifetimeClosed:0}
{MaxOpenConnections:1 OpenConnections:1 InUse:0 Idle:1 WaitCount:0 WaitDuration:0s MaxIdleClosed:10 MaxLifetimeClosed:0}
By patching a driver I noticed that only a single connection is established in fact. But the statistic is wrong.
/cc @kardianos
The text was updated successfully, but these errors were encountered: