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

Issue 10878090: Keep pool of pre-connected DNS sockets (Closed)

Created:
8 years, 3 months ago by Deprecated (see juliatuttle)
Modified:
8 years ago
Reviewers:
cbentzel, szym, mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Keep pool of pre-connected DNS sockets. This adds more entropy to our source ports on Windows, which allocates ports sequentially. (We explicitly pick random ports on other platforms, but asking for a particular source port triggers a firewall warning on Windows, so we don't.) BUG=107413 TEST=DnsTransactionTest Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=173038

Patch Set 1 #

Total comments: 9

Patch Set 2 : Move to socket buffers and callbacks for dependency injection #

Total comments: 12

Patch Set 3 : Use a single, separate DnsSocketPool object #

Total comments: 80

Patch Set 4 : #

Total comments: 48

Patch Set 5 : #

Total comments: 4

Patch Set 6 : #

Total comments: 1

Patch Set 7 : rebase #

Patch Set 8 : Fix DnsSession destructor #

Patch Set 9 : NET_EXPORT_PRIVATE DnsSocketPool #

Patch Set 10 : Don't OVERRIDE declarations #

Patch Set 11 : Avoid tautological comparison warning from clang #

Patch Set 12 : rebase #

Total comments: 1

Patch Set 13 : Add comments to dns_socket_pool.h #

Patch Set 14 : rebase #

Patch Set 15 : Make SocketLease NET_EXPORT_PRIVATE explciitly #

Patch Set 16 : rebase #

Total comments: 1

Patch Set 17 : Add second NET_EXPORT_PRIVATE back #

Unified diffs Side-by-side diffs Delta from patch set Stats (+649 lines, -54 lines) Patch
M net/dns/dns_client.cc View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M net/dns/dns_session.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 4 chunks +33 lines, -5 lines 0 comments Download
M net/dns/dns_session.cc View 1 2 3 4 5 6 7 2 chunks +47 lines, -5 lines 0 comments Download
A net/dns/dns_session_unittest.cc View 1 2 3 4 1 chunk +225 lines, -0 lines 0 comments Download
A net/dns/dns_socket_pool.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +83 lines, -0 lines 0 comments Download
A net/dns/dns_socket_pool.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +222 lines, -0 lines 0 comments Download
M net/dns/dns_transaction.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 chunks +32 lines, -42 lines 0 comments Download
M net/dns/dns_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (0 generated)
cbentzel
Could this just use the ClientSocketHandle/ClientSocketPool classes instead of creating something very similar? http://codereview.chromium.org/10878090/diff/1/net/dns/dns_session.cc File ...
8 years, 3 months ago (2012-08-29 16:48:06 UTC) #1
cbentzel
On 2012/08/29 16:48:06, cbentzel wrote: > Could this just use the ClientSocketHandle/ClientSocketPool classes instead of ...
8 years, 3 months ago (2012-08-29 16:50:01 UTC) #2
szym
http://codereview.chromium.org/10878090/diff/1/net/dns/dns_session.cc File net/dns/dns_session.cc (right): http://codereview.chromium.org/10878090/diff/1/net/dns/dns_session.cc#newcode102 net/dns/dns_session.cc:102: socket.reset(NULL); On 2012/08/29 16:48:06, cbentzel wrote: > Is this ...
8 years, 3 months ago (2012-08-29 16:57:08 UTC) #3
cbentzel
http://codereview.chromium.org/10878090/diff/1/net/dns/dns_session.h File net/dns/dns_session.h (right): http://codereview.chromium.org/10878090/diff/1/net/dns/dns_session.h#newcode66 net/dns/dns_session.h:66: scoped_ptr<SocketLease> AllocateSocket(int server_index); On 2012/08/29 16:57:08, szym wrote: > ...
8 years, 3 months ago (2012-08-29 17:03:48 UTC) #4
Deprecated (see juliatuttle)
https://chromiumcodereview.appspot.com/10878090/diff/1/net/dns/dns_session.h File net/dns/dns_session.h (right): https://chromiumcodereview.appspot.com/10878090/diff/1/net/dns/dns_session.h#newcode66 net/dns/dns_session.h:66: scoped_ptr<SocketLease> AllocateSocket(int server_index); On 2012/08/29 17:03:48, cbentzel wrote: > ...
8 years, 3 months ago (2012-08-29 17:52:34 UTC) #5
mmenke
Do we gain anything from re-using sockets, rather than just creating new ones when we ...
8 years, 3 months ago (2012-08-29 17:57:35 UTC) #6
Deprecated (see juliatuttle)
On 2012/08/29 17:57:35, Matt Menke wrote: > Do we gain anything from re-using sockets, rather ...
8 years, 3 months ago (2012-08-29 18:14:59 UTC) #7
mmenke
On 2012/08/29 18:14:59, ttuttle wrote: > On 2012/08/29 17:57:35, Matt Menke wrote: > > Do ...
8 years, 3 months ago (2012-08-29 18:16:46 UTC) #8
Deprecated (see juliatuttle)
On 2012/08/29 18:16:46, Matt Menke wrote: > On 2012/08/29 18:14:59, ttuttle wrote: > > On ...
8 years, 3 months ago (2012-08-29 18:24:58 UTC) #9
Deprecated (see juliatuttle)
Oh, one reason to do the pool solution is that, whether it's using Chrome-chosen or ...
8 years, 3 months ago (2012-08-29 18:27:26 UTC) #10
szym
http://codereview.chromium.org/10878090/diff/1/net/dns/dns_session.h File net/dns/dns_session.h (right): http://codereview.chromium.org/10878090/diff/1/net/dns/dns_session.h#newcode49 net/dns/dns_session.h:49: bool bypass_pools, You could also consider making SocketPool a ...
8 years, 3 months ago (2012-09-04 15:42:27 UTC) #11
Deprecated (see juliatuttle)
I just went to do that, and here's the sticky part: If we want to, ...
8 years, 3 months ago (2012-09-05 01:33:15 UTC) #12
szym
On 2012/09/05 01:33:15, ttuttle wrote: > I just went to do that, and here's the ...
8 years, 3 months ago (2012-09-05 02:43:33 UTC) #13
mmenke
On 2012/09/05 02:43:33, szym wrote: > On 2012/09/05 01:33:15, ttuttle wrote: > > I just ...
8 years, 3 months ago (2012-09-05 02:50:47 UTC) #14
szym
On 2012/09/05 02:50:47, Matt Menke wrote: > On 2012/09/05 02:43:33, szym wrote: > > On ...
8 years, 3 months ago (2012-09-05 02:57:39 UTC) #15
Deprecated (see juliatuttle)
On 2012/09/05 02:57:39, szym wrote: > On 2012/09/05 02:50:47, Matt Menke wrote: > > On ...
8 years, 3 months ago (2012-09-05 17:00:15 UTC) #16
szym
Given that DnsSession::AllocateSocket/ReleaseSocket take an |index| argument, I think it'd make things simpler to have ...
8 years, 3 months ago (2012-09-10 19:31:00 UTC) #17
Deprecated (see juliatuttle)
https://chromiumcodereview.appspot.com/10878090/diff/13002/net/dns/dns_session.cc File net/dns/dns_session.cc (right): https://chromiumcodereview.appspot.com/10878090/diff/13002/net/dns/dns_session.cc#newcode208 net/dns/dns_session.cc:208: CHECK(index >= 0); On 2012/09/10 19:31:00, szym wrote: > ...
8 years, 3 months ago (2012-09-14 15:28:17 UTC) #18
szym
http://codereview.chromium.org/10878090/diff/21001/net/dns/dns_session.h File net/dns/dns_session.h (right): http://codereview.chromium.org/10878090/diff/21001/net/dns/dns_session.h#newcode30 net/dns/dns_session.h:30: class SocketPool; leftovers? http://codereview.chromium.org/10878090/diff/21001/net/dns/dns_session.h#newcode46 net/dns/dns_session.h:46: scoped_ptr<DatagramClientSocket> socket_; DISALLOW_COPY_AND_ASSIGN http://codereview.chromium.org/10878090/diff/21001/net/dns/dns_session.h#newcode50 ...
8 years, 3 months ago (2012-09-14 20:49:27 UTC) #19
Deprecated (see juliatuttle)
https://chromiumcodereview.appspot.com/10878090/diff/21001/net/dns/dns_session.h File net/dns/dns_session.h (right): https://chromiumcodereview.appspot.com/10878090/diff/21001/net/dns/dns_session.h#newcode30 net/dns/dns_session.h:30: class SocketPool; On 2012/09/14 20:49:27, szym wrote: > leftovers? ...
8 years, 3 months ago (2012-09-18 20:28:00 UTC) #20
Deprecated (see juliatuttle)
PTAL.
8 years, 3 months ago (2012-09-24 17:03:06 UTC) #21
szym
Sorry for the delay. Note the IMPORTANT leak. http://codereview.chromium.org/10878090/diff/21001/net/dns/dns_socket_pool.cc File net/dns/dns_socket_pool.cc (right): http://codereview.chromium.org/10878090/diff/21001/net/dns/dns_socket_pool.cc#newcode91 net/dns/dns_socket_pool.cc:91: std::vector<std::vector<DatagramClientSocket*> ...
8 years, 2 months ago (2012-09-26 11:16:12 UTC) #22
Deprecated (see juliatuttle)
PTAL. https://chromiumcodereview.appspot.com/10878090/diff/21001/net/dns/dns_socket_pool.cc File net/dns/dns_socket_pool.cc (right): https://chromiumcodereview.appspot.com/10878090/diff/21001/net/dns/dns_socket_pool.cc#newcode91 net/dns/dns_socket_pool.cc:91: std::vector<std::vector<DatagramClientSocket*> > pools_; On 2012/09/26 11:16:12, szym wrote: ...
8 years, 2 months ago (2012-09-26 20:44:50 UTC) #23
szym
Please fix the destructor and lint errors. Otherwise LGTM. https://chromiumcodereview.appspot.com/10878090/diff/36002/net/dns/dns_socket_pool.cc File net/dns/dns_socket_pool.cc (right): https://chromiumcodereview.appspot.com/10878090/diff/36002/net/dns/dns_socket_pool.cc#newcode40 net/dns/dns_socket_pool.cc:40: ...
8 years, 2 months ago (2012-09-26 21:03:33 UTC) #24
szym
Please hold off committing this until http://crbug.com/151896 is fixed.
8 years, 2 months ago (2012-09-27 17:04:29 UTC) #25
Deprecated (see juliatuttle)
PTAL. https://chromiumcodereview.appspot.com/10878090/diff/36002/net/dns/dns_socket_pool.cc File net/dns/dns_socket_pool.cc (right): https://chromiumcodereview.appspot.com/10878090/diff/36002/net/dns/dns_socket_pool.cc#newcode40 net/dns/dns_socket_pool.cc:40: typedef std::vector<DatagramClientSocket*> SocketVector; On 2012/09/26 21:03:33, szym wrote: ...
8 years, 2 months ago (2012-10-01 21:30:07 UTC) #26
szym
http://codereview.chromium.org/10878090/diff/41001/net/dns/dns_socket_pool.cc File net/dns/dns_socket_pool.cc (right): http://codereview.chromium.org/10878090/diff/41001/net/dns/dns_socket_pool.cc#newcode152 net/dns/dns_socket_pool.cc:152: NetLog* net_log) OVERRIDE { OVERRIDE is only used/allowed on ...
8 years, 2 months ago (2012-10-08 19:32:16 UTC) #27
Deprecated (see juliatuttle)
PTAL.
8 years, 2 months ago (2012-10-15 19:11:27 UTC) #28
cbentzel
http://codereview.chromium.org/10878090/diff/57001/net/dns/dns_socket_pool.h File net/dns/dns_socket_pool.h (right): http://codereview.chromium.org/10878090/diff/57001/net/dns/dns_socket_pool.h#newcode20 net/dns/dns_socket_pool.h:20: class NET_EXPORT_PRIVATE DnsSocketPool { Please provide a brief comment ...
8 years, 1 month ago (2012-10-25 21:15:45 UTC) #29
szym
I think it's a good time to land this now, when there are no pending ...
8 years, 1 month ago (2012-11-06 21:42:09 UTC) #30
Deprecated (see juliatuttle)
PTAL. (Added comments.)
8 years, 1 month ago (2012-11-07 20:25:11 UTC) #31
cbentzel
On 2012/11/07 20:25:11, ttuttle wrote: > PTAL. (Added comments.) Comments look good, thanks.
8 years, 1 month ago (2012-11-07 20:26:02 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ttuttle@chromium.org/10878090/69001
8 years, 1 month ago (2012-11-07 20:32:54 UTC) #33
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years, 1 month ago (2012-11-07 21:19:35 UTC) #34
szym
My clone of this CL: https://codereview.chromium.org/11573012/ seems to be compiling on all trybots. Let's give ...
8 years ago (2012-12-13 20:19:45 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ttuttle@chromium.org/10878090/90001
8 years ago (2012-12-13 20:52:14 UTC) #36
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years ago (2012-12-13 21:41:52 UTC) #37
szym
https://codereview.chromium.org/10878090/diff/90001/net/dns/dns_session.h File net/dns/dns_session.h (right): https://codereview.chromium.org/10878090/diff/90001/net/dns/dns_session.h#newcode32 net/dns/dns_session.h:32: class SocketLease { NET_EXPORT_PRIVATE got lost in the rebase?
8 years ago (2012-12-13 21:45:24 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ttuttle@chromium.org/10878090/91004
8 years ago (2012-12-13 22:10:02 UTC) #39
commit-bot: I haz the power
8 years ago (2012-12-14 01:42:33 UTC) #40
Message was sent while issue was closed.
Change committed as 173038

Powered by Google App Engine
This is Rietveld 408576698