mirror of
https://github.com/golang/go
synced 2024-11-14 09:10:27 -07:00
c468f94672
Previously if the connection pool was larger than maxBadConnRetries and there were a lot of bad connections in the pool (for example if the database server was restarted), a query might have failed with an ErrBadConn unnecessarily. Instead of trying to guess how many times to retry, try maxBadConnRetries times and then force a fresh connection to be used for the last attempt. At the same time, lower maxBadConnRetries to a smaller value now that it's not that important to retry so many times from the free connection list. Fixes #8834 Change-Id: I6542f151a766a658980fb396fa4880ecf5874e3d Reviewed-on: https://go-review.googlesource.com/2034 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> |
||
---|---|---|
.. | ||
driver | ||
convert_test.go | ||
convert.go | ||
doc.txt | ||
example_test.go | ||
fakedb_test.go | ||
sql_test.go | ||
sql.go |