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

Issue 2678353003: Close idle H2 sockets when SpdySession is initialized. (Closed)

Created:
3 years, 10 months ago by xunjieli
Modified:
3 years, 9 months ago
Reviewers:
Bence, *davidben
CC:
chromium-reviews, cbentzel+watch_chromium.org, bnc+watch_chromium.org, net-reviews_chromium.org, tbansal1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Close idle H2 sockets when SpdySession is initialized. Once a SpdySession is initialized, subsequent H2 requests to the same host will reuse the connection, bypassing socket pool logic. Therefore, if we have multiple H2 idle sockets, they can hang around for a while in socket pools. This CL tries to clean up these idle H2 sockets when a SpdySession is initialized, since we will never use those idle sockets again. This new behavior is hidden behind feature flag: CloseIdleH2SocketsEarly. BUG=690918 Review-Url: https://codereview.chromium.org/2678353003 Cr-Commit-Position: refs/heads/master@{#454607} Committed: https://chromium.googlesource.com/chromium/src/+/92feb33d4dfa486c134e10cec36ff8b85e31d3aa

Patch Set 1 #

Total comments: 16

Patch Set 2 : Address Bence comments #

Patch Set 3 : Self #

Total comments: 12

Patch Set 4 : Pure rebase #

Patch Set 5 : Address comments to hook directly to ClientSocketHandle #

Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -28 lines) Patch
M net/http/http_network_transaction_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M net/http/http_proxy_client_socket_pool.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M net/http/http_proxy_client_socket_pool.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M net/socket/client_socket_handle.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M net/socket/client_socket_handle.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M net/socket/client_socket_pool.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M net/socket/client_socket_pool_base.h View 1 2 3 3 chunks +14 lines, -0 lines 0 comments Download
M net/socket/client_socket_pool_base.cc View 1 2 3 4 3 chunks +44 lines, -28 lines 0 comments Download
M net/socket/client_socket_pool_base_unittest.cc View 1 2 3 2 chunks +34 lines, -0 lines 0 comments Download
M net/socket/socks_client_socket_pool.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M net/socket/socks_client_socket_pool.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_pool.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_pool.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M net/socket/transport_client_socket_pool.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M net/socket/transport_client_socket_pool.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M net/socket/websocket_transport_client_socket_pool.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M net/socket/websocket_transport_client_socket_pool.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M net/spdy/spdy_session.cc View 1 2 3 4 3 chunks +11 lines, -0 lines 0 comments Download
M net/spdy/spdy_session_unittest.cc View 1 2 3 4 2 chunks +82 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (27 generated)
xunjieli
Bence and David: PTAL. Thanks.
3 years, 10 months ago (2017-02-07 20:58:37 UTC) #8
Bence
LGTM with nits, but I am not very familiar with socket pools, so please wait ...
3 years, 10 months ago (2017-02-08 00:18:52 UTC) #14
xunjieli
Thanks! David, PTAL. https://codereview.chromium.org/2678353003/diff/80001/net/spdy/spdy_session.cc File net/spdy/spdy_session.cc (right): https://codereview.chromium.org/2678353003/diff/80001/net/spdy/spdy_session.cc#newcode838 net/spdy/spdy_session.cc:838: // this Http2 connection. On 2017/02/08 ...
3 years, 10 months ago (2017-02-08 14:15:40 UTC) #15
davidben
Just a few nits and one comment below which would hopefully make a few things ...
3 years, 9 months ago (2017-03-02 22:00:52 UTC) #23
davidben
(Oh, sorry, missed a file. Just tiny nitpicks.) https://codereview.chromium.org/2678353003/diff/120001/net/spdy/spdy_session_unittest.cc File net/spdy/spdy_session_unittest.cc (right): https://codereview.chromium.org/2678353003/diff/120001/net/spdy/spdy_session_unittest.cc#newcode6037 net/spdy/spdy_session_unittest.cc:6037: size_t ...
3 years, 9 months ago (2017-03-02 22:05:52 UTC) #24
xunjieli
Thanks! https://codereview.chromium.org/2678353003/diff/120001/net/socket/client_socket_pool_base.cc File net/socket/client_socket_pool_base.cc (right): https://codereview.chromium.org/2678353003/diff/120001/net/socket/client_socket_pool_base.cc#newcode617 net/socket/client_socket_pool_base.cc:617: base::TimeTicks now = base::TimeTicks::Now(); On 2017/03/02 22:00:51, davidben ...
3 years, 9 months ago (2017-03-02 23:04:01 UTC) #27
davidben
lgtm
3 years, 9 months ago (2017-03-03 03:16:36 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2678353003/160001
3 years, 9 months ago (2017-03-03 17:14:48 UTC) #33
commit-bot: I haz the power
3 years, 9 months ago (2017-03-03 17:20:14 UTC) #36
Message was sent while issue was closed.
Committed patchset #5 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/92feb33d4dfa486c134e10cec36f...

Powered by Google App Engine
This is Rietveld 408576698