Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(519)

Issue 12646044: code review 12646044: database/sql: Close bad driver connections so they're r...

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by anacrolix
Modified:
10 years, 8 months ago
Reviewers:
bradfitz
CC:
golang-dev, bradfitz
Visibility:
Public.

Description

database/sql: Close bad driver connections so they're removed from the statement connections list. Fixes an issue where prepared statements that outlive many connections become expensive to invoke. Fixes issue 6081

Patch Set 1 #

Patch Set 2 : diff -r 2a74ed09bf00 https://code.google.com/p/go/ #

Patch Set 3 : diff -r 2a74ed09bf00 https://code.google.com/p/go/ #

Patch Set 4 : diff -r 9f6a7e4c3f62 https://code.google.com/p/go/ #

Patch Set 5 : diff -r 9f6a7e4c3f62 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M src/pkg/database/sql/sql.go View 1 2 chunks +4 lines, -3 lines 0 comments Download
M src/pkg/database/sql/sql_test.go View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 11
anacrolix
Hello golang-dev@googlegroups.com (cc: bradfitz@golang.org), I'd like you to review this change to https://code.google.com/p/go/
10 years, 8 months ago (2013-08-09 06:01:26 UTC) #1
bradfitz
All changes should include a test. Can you describe what's happening here such that a ...
10 years, 8 months ago (2013-08-09 20:18:19 UTC) #2
anacrolix
In func (s *Stmt) connStmt(), an array of connStmt's, s.css, is traversed to locate a ...
10 years, 8 months ago (2013-08-10 04:35:45 UTC) #3
anacrolix
Not sure if my previous message was received.
10 years, 8 months ago (2013-08-11 04:39:33 UTC) #4
anacrolix
On production systems at Brandscreen we're seeing the Stmt.css array get as long as 1850, ...
10 years, 8 months ago (2013-08-12 11:13:07 UTC) #5
bradfitz
Go 1.2 will be the default, unless this gets in before a point release and ...
10 years, 8 months ago (2013-08-12 15:09:41 UTC) #6
bradfitz
LGTM I can't submit this until you've submitted a CLA, though. See http://golang.org/doc/contribute.html#copyright Let me ...
10 years, 8 months ago (2013-08-13 22:24:04 UTC) #7
anacrolix
The CLA is in. I've verified the test demonstrates the problem, and the patch fixes ...
10 years, 8 months ago (2013-08-14 02:26:58 UTC) #8
anacrolix
Hello golang-dev@googlegroups.com (cc: bradfitz@golang.org, golang-dev@googlegroups.com), Please take another look.
10 years, 8 months ago (2013-08-14 02:34:12 UTC) #9
anacrolix
Hello golang-dev@googlegroups.com (cc: bradfitz@golang.org, golang-dev@googlegroups.com), Please take another look.
10 years, 8 months ago (2013-08-14 02:35:12 UTC) #10
bradfitz
10 years, 8 months ago (2013-08-14 16:27:33 UTC) #11
*** Submitted as https://code.google.com/p/go/source/detail?r=572566a0cde3 ***

database/sql: fix accumulation of bad conns on prepared statements

Fixes an issue where prepared statements that outlive many
connections become expensive to invoke.

Fixes issue 6081

R=golang-dev
CC=bradfitz, golang-dev
https://codereview.appspot.com/12646044

Committer: Brad Fitzpatrick <bradfitz@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b