]> Cypherpunks repositories - gostls13.git/commit
database/sql: process all Session Resets synchronously
authorDaniel Theophanes <kardianos@gmail.com>
Fri, 26 Apr 2019 21:45:46 +0000 (14:45 -0700)
committerDaniel Theophanes <kardianos@gmail.com>
Tue, 17 Mar 2020 23:02:30 +0000 (23:02 +0000)
commit971f8a2f9a5beb0473f82d7299613c86d2b4a5b9
tree3e9675583d65cce4c6c0e60e155564af55cf952f
parent0eeec4f25dc6eccc4e76ab91053e2b4823c72714
database/sql: process all Session Resets synchronously

Adds a new interface, driver.ConnectionValidator, to allow
drivers to signal they should not be used again,
separatly from the session resetter interface.
This is done now that the session reset is done
after the connection is put into the connection pool.

Previous behavior attempted to run Session Resets
in a background worker. This implementation had two
problems: untested performance gains for additional
complexity, and failures when the pool size
exceeded the connection reset channel buffer size.

Fixes #31480

Change-Id: I7d483b883c24a362c292471e87a88db5b204d1d0
Reviewed-on: https://go-review.googlesource.com/c/go/+/174122
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/database/sql/driver/driver.go
src/database/sql/fakedb_test.go
src/database/sql/sql.go