[go] database/sql: wake cleaner if maxIdleTime set to less than maxLifetime

1 view
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Apr 17, 2025, 1:57:59 AM4/17/25
to Gerrit Bot, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Michael Pratt, Dmitri Shuralyov, Dmitri Shuralyov, Go LUCI, Daniel Theophanes, Brad Fitzpatrick, Kevin Burke, golang-co...@googlegroups.com

Gopher Robot submitted the change

Unreviewed changes

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Change information

Commit message:
database/sql: wake cleaner if maxIdleTime set to less than maxLifetime

The existing implementation wouldn't wake the connection cleaner if
maxIdleTime was set to a value less than maxLifetime while an existing
connection was open - resulting in idle connections not being discarded
until after the first maxLifetime had passed.

Fixes #45993
Change-Id: I074ed7ba9803354c8b3a41f2625ae0d8a7d5059b
GitHub-Last-Rev: 0d149d8d38bc9c2ad42a2a20dcfc73994d54fe23
GitHub-Pull-Request: golang/go#58490
Auto-Submit: Sean Liao <se...@liao.dev>
Reviewed-by: Sean Liao <se...@liao.dev>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Reviewed-by: Daniel Theophanes <kard...@gmail.com>
Reviewed-by: Michael Pratt <mpr...@google.com>
Files:
  • M src/database/sql/sql.go
Change size: XS
Delta: 1 file changed, 2 insertions(+), 2 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Sean Liao, +2 by Daniel Theophanes, +1 by Dmitri Shuralyov, +1 by Michael Pratt
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I074ed7ba9803354c8b3a41f2625ae0d8a7d5059b
Gerrit-Change-Number: 467655
Gerrit-PatchSet: 5
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
Gerrit-Reviewer: Daniel Theophanes <kard...@gmail.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-Reviewer: Sean Liao <se...@liao.dev>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-CC: Kevin Burke <ke...@burke.dev>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages