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

Issue 19498003: [net/dns] Perform A/AAAA queries for AF_UNSPEC resolutions in parallel. (Closed)

Created:
7 years, 5 months ago by mmenke
Modified:
7 years, 4 months ago
Reviewers:
szym
CC:
chromium-reviews, cbentzel+watch_chromium.org
Visibility:
Public.

Description

[net/dns] Perform A/AAAA queries for AF_UNSPEC resolutions in parallel. The second DnsTransaction is scheduled as a second job on the resolver's PrioritizedDispatcher, at the beginning of its priority queue. The two DnsTransactions run independently of each other, although if one of them finishes with an error, the other one will be scrapped immediately, and the Job will fall back to ProcTask. BUG=174992 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=218616

Patch Set 1 #

Patch Set 2 : Split off async start to another CL, sync #

Patch Set 3 : Fix minor stuff #

Patch Set 4 : Another trivial fix #

Patch Set 5 : cleanup #

Patch Set 6 : Add at front, more unit tests #

Total comments: 1

Patch Set 7 : Add space #

Total comments: 51

Patch Set 8 : sync #

Patch Set 9 : Response to comments #

Total comments: 6

Patch Set 10 : response to comments #

Patch Set 11 : Add PrioritizedDispatcher::Disable #

Total comments: 3

Patch Set 12 : Fix signed/unsigned comparisons, remove a couple of them as well #

Patch Set 13 : Make Disable() set limits. #

Total comments: 4

Patch Set 14 : Add DCHECK, NumPriorities->num_priorities #

Total comments: 1

Patch Set 15 : sync #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+776 lines, -224 lines) Patch
M chrome/browser/net/dns_probe_test_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -3 lines 0 comments Download
M net/base/prioritized_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +13 lines, -0 lines 0 comments Download
M net/base/prioritized_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +33 lines, -11 lines 0 comments Download
M net/base/prioritized_dispatcher_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +117 lines, -10 lines 0 comments Download
M net/base/priority_queue.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +21 lines, -0 lines 0 comments Download
M net/base/priority_queue_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +16 lines, -1 line 0 comments Download
M net/dns/dns_test_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +30 lines, -5 lines 0 comments Download
M net/dns/dns_test_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +65 lines, -46 lines 0 comments Download
M net/dns/host_resolver_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -2 lines 0 comments Download
M net/dns/host_resolver_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 20 chunks +211 lines, -99 lines 2 comments Download
M net/dns/host_resolver_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +263 lines, -47 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
mmenke
WDYT? This is "inspired" by your CL, though I do some things a little differently. ...
7 years, 5 months ago (2013-07-24 18:59:45 UTC) #1
szym
Thanks for picking up the slack and sorry for taking forever to review this. Overall ...
7 years, 4 months ago (2013-08-06 20:35:31 UTC) #2
mmenke
https://codereview.chromium.org/19498003/diff/33010/net/base/prioritized_dispatcher.h File net/base/prioritized_dispatcher.h (right): https://codereview.chromium.org/19498003/diff/33010/net/base/prioritized_dispatcher.h#newcode81 net/base/prioritized_dispatcher.h:81: Handle AddAtHead(Job* job, Priority priority); On 2013/08/06 20:35:31, szym ...
7 years, 4 months ago (2013-08-19 17:31:11 UTC) #3
mmenke
Also, thanks for the great feedback - very useful comments.
7 years, 4 months ago (2013-08-19 17:32:04 UTC) #4
mmenke
https://codereview.chromium.org/19498003/diff/33010/net/dns/host_resolver_impl_unittest.cc File net/dns/host_resolver_impl_unittest.cc (right): https://codereview.chromium.org/19498003/diff/33010/net/dns/host_resolver_impl_unittest.cc#newcode1809 net/dns/host_resolver_impl_unittest.cc:1809: // An IPv4 request should have been started pending ...
7 years, 4 months ago (2013-08-19 18:12:08 UTC) #5
szym
LGTM with nits, and a couple suggestions. https://codereview.chromium.org/19498003/diff/33010/net/dns/host_resolver_impl.cc File net/dns/host_resolver_impl.cc (right): https://codereview.chromium.org/19498003/diff/33010/net/dns/host_resolver_impl.cc#newcode1219 net/dns/host_resolver_impl.cc:1219: KillDnsTask(); On ...
7 years, 4 months ago (2013-08-19 18:47:20 UTC) #6
mmenke
https://codereview.chromium.org/19498003/diff/33010/net/dns/host_resolver_impl.cc File net/dns/host_resolver_impl.cc (right): https://codereview.chromium.org/19498003/diff/33010/net/dns/host_resolver_impl.cc#newcode1219 net/dns/host_resolver_impl.cc:1219: KillDnsTask(); On 2013/08/19 18:47:21, szym wrote: > On 2013/08/19 ...
7 years, 4 months ago (2013-08-19 19:31:33 UTC) #7
szym
https://codereview.chromium.org/19498003/diff/33010/net/dns/host_resolver_impl.cc File net/dns/host_resolver_impl.cc (right): https://codereview.chromium.org/19498003/diff/33010/net/dns/host_resolver_impl.cc#newcode1219 net/dns/host_resolver_impl.cc:1219: KillDnsTask(); On 2013/08/19 19:31:33, mmenke wrote: > On 2013/08/19 ...
7 years, 4 months ago (2013-08-19 19:46:45 UTC) #8
mmenke
https://codereview.chromium.org/19498003/diff/33010/net/dns/host_resolver_impl.cc File net/dns/host_resolver_impl.cc (right): https://codereview.chromium.org/19498003/diff/33010/net/dns/host_resolver_impl.cc#newcode1219 net/dns/host_resolver_impl.cc:1219: KillDnsTask(); On 2013/08/19 19:46:45, szym wrote: > On 2013/08/19 ...
7 years, 4 months ago (2013-08-19 19:57:40 UTC) #9
szym
https://codereview.chromium.org/19498003/diff/33010/net/dns/host_resolver_impl.cc File net/dns/host_resolver_impl.cc (right): https://codereview.chromium.org/19498003/diff/33010/net/dns/host_resolver_impl.cc#newcode1219 net/dns/host_resolver_impl.cc:1219: KillDnsTask(); On 2013/08/19 19:57:40, mmenke wrote: > On 2013/08/19 ...
7 years, 4 months ago (2013-08-19 20:00:40 UTC) #10
mmenke
https://codereview.chromium.org/19498003/diff/33010/net/dns/host_resolver_impl.cc File net/dns/host_resolver_impl.cc (right): https://codereview.chromium.org/19498003/diff/33010/net/dns/host_resolver_impl.cc#newcode1219 net/dns/host_resolver_impl.cc:1219: KillDnsTask(); On 2013/08/19 20:00:41, szym wrote: > On 2013/08/19 ...
7 years, 4 months ago (2013-08-19 20:41:12 UTC) #11
szym
https://codereview.chromium.org/19498003/diff/188002/net/base/prioritized_dispatcher.cc File net/base/prioritized_dispatcher.cc (right): https://codereview.chromium.org/19498003/diff/188002/net/base/prioritized_dispatcher.cc#newcode109 net/base/prioritized_dispatcher.cc:109: if (disabled_ || num_running_jobs_ >= max_running_jobs_[job_priority]) If instead of ...
7 years, 4 months ago (2013-08-19 20:49:34 UTC) #12
mmenke
https://codereview.chromium.org/19498003/diff/188002/net/base/prioritized_dispatcher.cc File net/base/prioritized_dispatcher.cc (right): https://codereview.chromium.org/19498003/diff/188002/net/base/prioritized_dispatcher.cc#newcode109 net/base/prioritized_dispatcher.cc:109: if (disabled_ || num_running_jobs_ >= max_running_jobs_[job_priority]) On 2013/08/19 20:49:34, ...
7 years, 4 months ago (2013-08-19 21:09:58 UTC) #13
szym
lgtm https://codereview.chromium.org/19498003/diff/201002/net/base/prioritized_dispatcher.cc File net/base/prioritized_dispatcher.cc (right): https://codereview.chromium.org/19498003/diff/201002/net/base/prioritized_dispatcher.cc#newcode108 net/base/prioritized_dispatcher.cc:108: void PrioritizedDispatcher::SetLimits(const Limits& limits) { suggest adding DCHECK_EQ(queue_.num_priorities(), ...
7 years, 4 months ago (2013-08-20 16:24:57 UTC) #14
mmenke
Thanks for the feedback! https://codereview.chromium.org/19498003/diff/201002/net/base/prioritized_dispatcher.cc File net/base/prioritized_dispatcher.cc (right): https://codereview.chromium.org/19498003/diff/201002/net/base/prioritized_dispatcher.cc#newcode108 net/base/prioritized_dispatcher.cc:108: void PrioritizedDispatcher::SetLimits(const Limits& limits) { ...
7 years, 4 months ago (2013-08-20 16:33:13 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmenke@chromium.org/19498003/234001
7 years, 4 months ago (2013-08-20 16:35:34 UTC) #16
szym
https://codereview.chromium.org/19498003/diff/234001/net/dns/host_resolver_impl.cc File net/dns/host_resolver_impl.cc (right): https://codereview.chromium.org/19498003/diff/234001/net/dns/host_resolver_impl.cc#newcode1888 net/dns/host_resolver_impl.cc:1888: job->Schedule(false); Looks like you'll need to resync this to ...
7 years, 4 months ago (2013-08-20 20:11:48 UTC) #17
mmenke
On 2013/08/20 20:11:48, szym wrote: > https://codereview.chromium.org/19498003/diff/234001/net/dns/host_resolver_impl.cc > File net/dns/host_resolver_impl.cc (right): > > https://codereview.chromium.org/19498003/diff/234001/net/dns/host_resolver_impl.cc#newcode1888 > ...
7 years, 4 months ago (2013-08-20 20:17:14 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmenke@chromium.org/19498003/249001
7 years, 4 months ago (2013-08-20 20:55:22 UTC) #19
commit-bot: I haz the power
Change committed as 218616
7 years, 4 months ago (2013-08-21 03:24:54 UTC) #20
szym
Let me know if you want to revert and fix. Otherwise, I'll just fix without ...
7 years, 4 months ago (2013-08-22 15:50:07 UTC) #21
mmenke1
7 years, 4 months ago (2013-08-22 15:53:46 UTC) #22
Message was sent while issue was closed.
On 2013/08/22 15:50:07, szym wrote:
> Let me know if you want to revert and fix. Otherwise, I'll just fix without
> reverting.

I'll revert and fix.

>
https://chromiumcodereview.appspot.com/19498003/diff/249001/net/dns/host_reso...
> File net/dns/host_resolver_impl.cc (left):
> 
>
https://chromiumcodereview.appspot.com/19498003/diff/249001/net/dns/host_reso...
> net/dns/host_resolver_impl.cc:1075: OnFailure(ERR_NAME_NOT_RESOLVED,
> DnsResponse::DNS_PARSE_OK);
> Oh oh... Looks like we missed handling of this case leading to
> http://crbug.com/277625
> I thought we had a test covering this case.
> 
> How about:
> proc_->AddRuleForAllFamilies("6ok_fallback", "192.168.0.1");
> CreateRequest("6ok_fallback", 80, MEDIUM, ADDRESS_FAMILY_IPV4)->Resolve();
> EXPECT_EQ(OK, requests_[0]->WaitForResult());
> EXPECT_TRUE(requests_[0]->HasOneAddress("192.168.0.1", 80));
> 
> Could also consider adding a MockDnsRule for "empty" which just returns an
empty
> response.
> 
>
https://chromiumcodereview.appspot.com/19498003/diff/249001/net/dns/host_reso...
> File net/dns/host_resolver_impl.cc (right):
> 
>
https://chromiumcodereview.appspot.com/19498003/diff/249001/net/dns/host_reso...
> net/dns/host_resolver_impl.cc:1110: 
> if (addr_list.empty()) {
>   OnFailure(ERR_NAME_NOT_RESOLVED, DnsResponse::DNS_PARSE_OK);
>   return;
> }

Powered by Google App Engine
This is Rietveld 408576698