Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Issue 197283012: Retry requests on reused sockets that receive ERR_EMPTY_RESPONSE. (Closed)

Created:
6 years, 9 months ago by davidben
Modified:
6 years, 9 months ago
Reviewers:
mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org
Visibility:
Public.

Description

Retry requests on reused sockets that receive ERR_EMPTY_RESPONSE. We retry requests on ERR_CONNECTION_CLOSED in case of a close/reuse race, but ERR_CONNECTION_CLOSED is converted to ERR_EMPTY_RESPONSE if this is a socket's first request. Such a socket is normally not reused unless it was a preconnect miss. To avoid test flakiness, make the UNUSED vs UNUSED_IDLE determination not timing-sensitive. The existing logic is compares idle_time to 0, so it's dependent on clock granularity rather than any intentional timeout. Add equivalent tests to HttpNetworkTransactionTest.KeepAliveConnection for preconnect misses. BUG=352156 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257748

Patch Set 1 #

Total comments: 12

Patch Set 2 : mmenke comments #

Patch Set 3 : Use RunUntilIdle() #

Patch Set 4 : Make UNUSED vs UNUSED_IDLE determination not timing-sensitive. #

Total comments: 2

Patch Set 5 : Indentation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -33 lines) Patch
M net/http/http_network_transaction.h View 1 chunk +3 lines, -3 lines 0 comments Download
M net/http/http_network_transaction.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 5 chunks +109 lines, -1 line 0 comments Download
M net/http/http_pipelined_connection_impl.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_proxy_client_socket.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_stream_parser.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/socket/client_socket_handle.h View 1 2 3 3 chunks +4 lines, -12 lines 0 comments Download
M net/socket/client_socket_handle.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M net/socket/client_socket_pool_base.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M net/socket/client_socket_pool_base.cc View 1 2 3 4 8 chunks +15 lines, -9 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
davidben
(I believe the red trybot runs are from it testing off too old a revision. ...
6 years, 9 months ago (2014-03-14 16:16:22 UTC) #1
mmenke
LGTM https://codereview.chromium.org/197283012/diff/1/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/197283012/diff/1/net/http/http_network_transaction_unittest.cc#newcode1309 net/http/http_network_transaction_unittest.cc:1309: void HttpNetworkTransactionTest::PreconnectMissResendRequestTest( Not sure if "PreconnectMiss" is quite ...
6 years, 9 months ago (2014-03-14 16:38:06 UTC) #2
davidben
https://codereview.chromium.org/197283012/diff/1/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/197283012/diff/1/net/http/http_network_transaction_unittest.cc#newcode1309 net/http/http_network_transaction_unittest.cc:1309: void HttpNetworkTransactionTest::PreconnectMissResendRequestTest( On 2014/03/14 16:38:06, mmenke wrote: > Not ...
6 years, 9 months ago (2014-03-14 18:35:02 UTC) #3
davidben
Okay, apparently OnPreconnectsCompleteInternal is a lie[0], so I swapped it out for RunUntilIdle(), annoying as ...
6 years, 9 months ago (2014-03-14 22:00:40 UTC) #4
mmenke
Still LGTM
6 years, 9 months ago (2014-03-17 17:48:10 UTC) #5
davidben
The win_swarm_triggered bot didn't like the test. Current theory is that it thought the connection ...
6 years, 9 months ago (2014-03-17 19:58:18 UTC) #6
mmenke
And still LGTM (I do think it's kinda odd that a REUSED_IDLE socket may never ...
6 years, 9 months ago (2014-03-18 14:20:48 UTC) #7
mmenke
Oops...forgot to publish my nit. https://codereview.chromium.org/197283012/diff/60001/net/socket/client_socket_pool_base.cc File net/socket/client_socket_pool_base.cc (right): https://codereview.chromium.org/197283012/diff/60001/net/socket/client_socket_pool_base.cc#newcode484 net/socket/client_socket_pool_base.cc:484: ClientSocketHandle::UNUSED_IDLE; optional: May be ...
6 years, 9 months ago (2014-03-18 14:29:17 UTC) #8
davidben
https://codereview.chromium.org/197283012/diff/60001/net/socket/client_socket_pool_base.cc File net/socket/client_socket_pool_base.cc (right): https://codereview.chromium.org/197283012/diff/60001/net/socket/client_socket_pool_base.cc#newcode484 net/socket/client_socket_pool_base.cc:484: ClientSocketHandle::UNUSED_IDLE; On 2014/03/18 14:29:17, mmenke wrote: > optional: May ...
6 years, 9 months ago (2014-03-18 15:08:12 UTC) #9
davidben
On 2014/03/18 14:20:48, mmenke wrote: > And still LGTM (I do think it's kinda odd ...
6 years, 9 months ago (2014-03-18 15:09:26 UTC) #10
davidben
The CQ bit was checked by davidben@chromium.org
6 years, 9 months ago (2014-03-18 15:09:36 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davidben@chromium.org/197283012/80001
6 years, 9 months ago (2014-03-18 15:10:23 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 20:50:01 UTC) #13
commit-bot: I haz the power
Commit queue rejected this change because the description was changed between the time the change ...
6 years, 9 months ago (2014-03-18 20:50:02 UTC) #14
davidben
The CQ bit was checked by davidben@chromium.org
6 years, 9 months ago (2014-03-18 20:51:32 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davidben@chromium.org/197283012/80001
6 years, 9 months ago (2014-03-18 20:56:08 UTC) #16
commit-bot: I haz the power
6 years, 9 months ago (2014-03-18 20:59:57 UTC) #17
Message was sent while issue was closed.
Change committed as 257748

Powered by Google App Engine
This is Rietveld 408576698