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

Issue 7349023: Changed SPDY's ip connection pooling logic to only add the used IP, (Closed)

Created:
9 years, 5 months ago by ramant (doing other things)
Modified:
9 years, 5 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Changed SPDY's ip connection pooling logic to only add the used IP, rather than all the IPs for the hostname, to the SpdyAliasMap. This is to fix the following problem: When we establish a new SPDY connection, we add all IP addresses for that hostname to our alias map. Therefore, if we connect to host foo which maps to IPs X, Y, and Z, but the actual IP we connect to is X, then if we try to get a SPDY connection to host bar which maps to IPs Y and Z, then currently we will share the SPDY connection to host foo on IP X. BUG=89094 R=willchan TEST=spdy unit tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=93105

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 1

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 3

Patch Set 6 : '' #

Total comments: 26

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Total comments: 4

Patch Set 12 : '' #

Patch Set 13 : '' #

Total comments: 6

Patch Set 14 : '' #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -40 lines) Patch
M net/http/http_network_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +39 lines, -0 lines 6 comments Download
M net/socket/ssl_client_socket_pool_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +13 lines, -4 lines 0 comments Download
M net/spdy/spdy_session_pool.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -2 lines 2 comments Download
M net/spdy/spdy_session_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +20 lines, -30 lines 2 comments Download
M net/spdy/spdy_session_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +11 lines, -4 lines 0 comments Download
M net/spdy/spdy_test_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
wtc
http://codereview.chromium.org/7349023/diff/1003/net/spdy/spdy_session_pool.cc File net/spdy/spdy_session_pool.cc (right): http://codereview.chromium.org/7349023/diff/1003/net/spdy/spdy_session_pool.cc#newcode166 net/spdy/spdy_session_pool.cc:166: return error; Testing error == net::OK is too strict. ...
9 years, 5 months ago (2011-07-14 02:30:40 UTC) #1
willchan no longer on Chromium
I didn't look at your IP address changes in the tests, but do they add ...
9 years, 5 months ago (2011-07-14 12:35:39 UTC) #2
wtc
http://codereview.chromium.org/7349023/diff/1010/net/spdy/spdy_session_pool.cc File net/spdy/spdy_session_pool.cc (right): http://codereview.chromium.org/7349023/diff/1010/net/spdy/spdy_session_pool.cc#newcode153 net/spdy/spdy_session_pool.cc:153: // We have a new session. Lookup the IP ...
9 years, 5 months ago (2011-07-14 17:03:14 UTC) #3
willchan no longer on Chromium
http://codereview.chromium.org/7349023/diff/1010/net/spdy/spdy_session_pool.cc File net/spdy/spdy_session_pool.cc (right): http://codereview.chromium.org/7349023/diff/1010/net/spdy/spdy_session_pool.cc#newcode153 net/spdy/spdy_session_pool.cc:153: // We have a new session. Lookup the IP ...
9 years, 5 months ago (2011-07-14 17:10:51 UTC) #4
willchan no longer on Chromium
http://codereview.chromium.org/7349023/diff/11001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): http://codereview.chromium.org/7349023/diff/11001/net/http/http_network_transaction_unittest.cc#newcode8705 net/http/http_network_transaction_unittest.cc:8705: TEST_F(HttpNetworkTransactionTest, DISABLED_UseIPConnectionPooling) { Is this going to be fixed? ...
9 years, 5 months ago (2011-07-17 01:23:45 UTC) #5
ramant (doing other things)
Hi willchan, Made the changes you have suggested (except using MockClientSocket::GetPeerAddress. It was returning port ...
9 years, 5 months ago (2011-07-17 08:12:30 UTC) #6
willchan no longer on Chromium
http://codereview.chromium.org/7349023/diff/12012/net/spdy/spdy_session_pool.cc File net/spdy/spdy_session_pool.cc (right): http://codereview.chromium.org/7349023/diff/12012/net/spdy/spdy_session_pool.cc#newcode362 net/spdy/spdy_session_pool.cc:362: if (!g_enable_ip_pooling) I think it should be DCHECK(g_enable_ip_pooling). We ...
9 years, 5 months ago (2011-07-17 12:44:46 UTC) #7
ramant (doing other things)
Hi willchan, Many many thanks for the very quick review and very good comments. Made ...
9 years, 5 months ago (2011-07-17 19:45:34 UTC) #8
willchan no longer on Chromium
Cool, LGTM once you fix the DISABLED tests.
9 years, 5 months ago (2011-07-17 19:52:21 UTC) #9
wtc
I only reviewed spdy_session_pool.{h,cc}. The changes look correct to me. http://codereview.chromium.org/7349023/diff/17020/net/spdy/spdy_session_pool.cc File net/spdy/spdy_session_pool.cc (right): http://codereview.chromium.org/7349023/diff/17020/net/spdy/spdy_session_pool.cc#newcode156 ...
9 years, 5 months ago (2011-07-19 00:11:15 UTC) #10
ramant (doing other things)
hi willchan and wan-teh, Made the changes you had suggested. Could you please review these ...
9 years, 5 months ago (2011-07-19 03:48:46 UTC) #11
willchan no longer on Chromium
LGTM, thanks
9 years, 5 months ago (2011-07-19 14:46:58 UTC) #12
wtc
I only reviewed http_network_transaction_unittest.cc and spdy_session_pool.{h,cc}. I suggest some changes below. http://codereview.chromium.org/7349023/diff/20001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): ...
9 years, 5 months ago (2011-07-19 22:12:36 UTC) #13
ramant (doing other things)
9 years, 5 months ago (2011-07-25 23:36:06 UTC) #14
Hi Wan-Teh,
  Added comments and did a minor cleanup of the comments in  
http_network_transaction_unittest.cc and submitted the following CL.

http://codereview.chromium.org/7471056/

thanks,
raman

http://codereview.chromium.org/7349023/diff/20001/net/http/http_network_trans...
File net/http/http_network_transaction_unittest.cc (right):

http://codereview.chromium.org/7349023/diff/20001/net/http/http_network_trans...
net/http/http_network_transaction_unittest.cc:8713: };
On 2011/07/19 22:12:36, wtc wrote:
> The need to preload this entry, with the magic hostname
> http://www.google.com and magic IP address 127.0.0.1, into the
> HostCache is very non-obvious.  Please document why.
> Otherwise a future maintainer will need to read the code
> review comments to reconstruct the reason.

Done.

http://codereview.chromium.org/7349023/diff/20001/net/http/http_network_trans...
net/http/http_network_transaction_unittest.cc:8718: test_hosts[i].iplist, "");
On 2011/07/19 22:12:36, wtc wrote:
> Align this line with the argument on the previous line.

Done.

http://codereview.chromium.org/7349023/diff/20001/net/http/http_network_trans...
net/http/http_network_transaction_unittest.cc:8721: // This test requires that
the HostResolver cache be populated.  Normal
On 2011/07/19 22:12:36, wtc wrote:
> By "This test", which test are you referring to?  Did you
> copy this function from some unit test?

Done.

http://codereview.chromium.org/7349023/diff/20001/net/spdy/spdy_session_pool.cc
File net/spdy/spdy_session_pool.cc (right):

http://codereview.chromium.org/7349023/diff/20001/net/spdy/spdy_session_pool....
net/spdy/spdy_session_pool.cc:162: AddAlias(address, host_port_proxy_pair);
On 2011/07/19 22:12:36, wtc wrote:
> Nit: you can just pass addresses.head() to AddAlias and
> remove the curly braces around the inner if statement.

Done.

http://codereview.chromium.org/7349023/diff/20001/net/spdy/spdy_session_pool.h
File net/spdy/spdy_session_pool.h (right):

http://codereview.chromium.org/7349023/diff/20001/net/spdy/spdy_session_pool....
net/spdy/spdy_session_pool.h:166: // Add |endpoint| as an IP-equivalent address
for |pair|.
On 2011/07/19 22:12:36, wtc wrote:
> |endpoint| => |address|

Done.

Powered by Google App Engine
This is Rietveld 408576698