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

Issue 79240044: code review 79240044: net/http: don't re-use Transport connections if we've s... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 1 month ago by bradfitz
Modified:
10 years, 1 month ago
Reviewers:
gobot, rsc
CC:
agl, rsc, agl1, golang-codereviews
Visibility:
Public.

Description

net/http: don't re-use Transport connections if we've seen an EOF This the second part of making persistent HTTPS connections to certain servers (notably Amazon) robust. See the story in part 1: https://codereview.appspot.com/76400046/ This is the http Transport change that notes whether our net.Conn.Read has ever seen an EOF. If it has, then we use that as an additional signal to not re-use that connection (in addition to the HTTP response headers) Fixes Issue 3514

Patch Set 1 #

Patch Set 2 : diff -r 62052ebe728b https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 62052ebe728b https://go.googlecode.com/hg/ #

Total comments: 7

Patch Set 4 : diff -r 2e0323211d75 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -1 line) Patch
M src/pkg/net/http/transport.go View 1 2 3 4 chunks +18 lines, -1 line 0 comments Download
M src/pkg/net/http/transport_test.go View 1 2 chunks +66 lines, -0 lines 0 comments Download

Messages

Total messages: 13
bradfitz
Hello agl@chromium.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
10 years, 1 month ago (2014-03-24 02:46:08 UTC) #1
bradfitz
Can I get a review on this one too? Copying Russ, who I talked to ...
10 years, 1 month ago (2014-03-25 15:35:39 UTC) #2
rsc
LGTM
10 years, 1 month ago (2014-03-25 15:39:28 UTC) #3
rsc
https://codereview.appspot.com/79240044/diff/40001/src/pkg/net/http/transport.go File src/pkg/net/http/transport.go (right): https://codereview.appspot.com/79240044/diff/40001/src/pkg/net/http/transport.go#newcode770 src/pkg/net/http/transport.go:770: pb, err := pc.br.Peek(1) Is there a missing check ...
10 years, 1 month ago (2014-03-25 15:43:40 UTC) #4
bradfitz
https://codereview.appspot.com/79240044/diff/40001/src/pkg/net/http/transport.go File src/pkg/net/http/transport.go (right): https://codereview.appspot.com/79240044/diff/40001/src/pkg/net/http/transport.go#newcode770 src/pkg/net/http/transport.go:770: pb, err := pc.br.Peek(1) On 2014/03/25 15:43:40, rsc wrote: ...
10 years, 1 month ago (2014-03-25 16:14:04 UTC) #5
agl1
https://codereview.appspot.com/79240044/diff/40001/src/pkg/net/http/transport.go File src/pkg/net/http/transport.go (right): https://codereview.appspot.com/79240044/diff/40001/src/pkg/net/http/transport.go#newcode726 src/pkg/net/http/transport.go:726: sawEOF bool // whether we've seen EOF from conn ...
10 years, 1 month ago (2014-03-25 16:14:15 UTC) #6
bradfitz
https://codereview.appspot.com/79240044/diff/40001/src/pkg/net/http/transport.go File src/pkg/net/http/transport.go (right): https://codereview.appspot.com/79240044/diff/40001/src/pkg/net/http/transport.go#newcode726 src/pkg/net/http/transport.go:726: sawEOF bool // whether we've seen EOF from conn ...
10 years, 1 month ago (2014-03-25 16:17:55 UTC) #7
rsc
https://codereview.appspot.com/79240044/diff/40001/src/pkg/net/http/transport.go File src/pkg/net/http/transport.go (right): https://codereview.appspot.com/79240044/diff/40001/src/pkg/net/http/transport.go#newcode770 src/pkg/net/http/transport.go:770: pb, err := pc.br.Peek(1) On 2014/03/25 16:14:04, bradfitz wrote: ...
10 years, 1 month ago (2014-03-25 16:18:50 UTC) #8
bradfitz
https://codereview.appspot.com/79240044/diff/40001/src/pkg/net/http/transport.go File src/pkg/net/http/transport.go (right): https://codereview.appspot.com/79240044/diff/40001/src/pkg/net/http/transport.go#newcode770 src/pkg/net/http/transport.go:770: pb, err := pc.br.Peek(1) On 2014/03/25 16:18:50, rsc wrote: ...
10 years, 1 month ago (2014-03-25 16:27:56 UTC) #9
rsc
LGTM https://codereview.appspot.com/79240044/diff/40001/src/pkg/net/http/transport.go File src/pkg/net/http/transport.go (right): https://codereview.appspot.com/79240044/diff/40001/src/pkg/net/http/transport.go#newcode770 src/pkg/net/http/transport.go:770: pb, err := pc.br.Peek(1) Great. Okay, then everything ...
10 years, 1 month ago (2014-03-25 16:55:11 UTC) #10
bradfitz
*** Submitted as https://code.google.com/p/go/source/detail?r=af4910816fca *** net/http: don't re-use Transport connections if we've seen an EOF ...
10 years, 1 month ago (2014-03-25 17:59:11 UTC) #11
gobot
This CL appears to have broken the windows-386-ec2 builder. See http://build.golang.org/log/24dd72e022e4b594c6331a658b565cfc25be1ff3
10 years, 1 month ago (2014-03-25 18:34:04 UTC) #12
bradfitz
10 years, 1 month ago (2014-03-25 18:51:52 UTC) #13
Real. I tried to make the test tolerant, but I guess I failed. In practice,
on Linux and Mac, with varying GOMAXPROCS, it was getting 17-19 of 20
attempts succeeding, so I set the tolerance to 1 pass per 20. (and before
the patches, it was always 0)

And here Windows shows 0.

I'll look into it more on a Windows machine.





On Tue, Mar 25, 2014 at 11:34 AM, <gobot@golang.org> wrote:

> This CL appears to have broken the windows-386-ec2 builder.
> See http://build.golang.org/log/24dd72e022e4b594c6331a658b565cfc25be1ff3
>
> https://codereview.appspot.com/79240044/
>
Sign in to reply to this message.

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