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

Issue 7466031: AsyncHostResolver: integrated HostCache, temporarily, until we have RR cache. (Closed)

Created:
9 years, 5 months ago by agayev
Modified:
9 years, 5 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, eroman, darin-cc_chromium.org, mmenke, Paweł Hajdan Jr.
Visibility:
Public.

Description

AsyncHostResolver: integrated HostCache, temporarily, until we have RR cache. BUG=60149 TEST=net_unittest --gtest_filter="AsyncHostResolverTest*" Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=93474

Patch Set 1 #

Patch Set 2 : Merged fixes. #

Patch Set 3 : Removed a duplicate function. #

Patch Set 4 : Fixed comment. #

Total comments: 9

Patch Set 5 : Addressed some issues cbentzel mentioned. #

Patch Set 6 : Got rid of unnecessary declaration. #

Patch Set 7 : Removed unnecessary function declaration. #

Patch Set 8 : Merged with trunk. #

Patch Set 9 : Fixed copyright year. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+145 lines, -65 lines) Patch
M net/base/address_list.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M net/base/address_list.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M net/base/async_host_resolver.h View 5 chunks +9 lines, -1 line 0 comments Download
M net/base/async_host_resolver.cc View 1 2 3 4 5 6 7 8 chunks +59 lines, -7 lines 0 comments Download
M net/base/async_host_resolver_unittest.cc View 1 2 3 4 4 chunks +21 lines, -5 lines 0 comments Download
M net/base/host_cache.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M net/base/host_cache.cc View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -1 line 0 comments Download
M net/base/host_resolver_impl.cc View 1 2 3 4 5 6 3 chunks +2 lines, -25 lines 0 comments Download
M net/base/host_resolver_impl_unittest.cc View 1 2 3 4 12 chunks +19 lines, -24 lines 0 comments Download
M net/base/net_log_event_type_list.h View 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
agayev
9 years, 5 months ago (2011-07-21 15:16:00 UTC) #1
cbentzel
http://codereview.chromium.org/7466031/diff/1017/net/base/async_host_resolver.cc File net/base/async_host_resolver.cc (right): http://codereview.chromium.org/7466031/diff/1017/net/base/async_host_resolver.cc#newcode69 net/base/async_host_resolver.cc:69: HostCache* CreateDefaultCache() { This should be shared with the ...
9 years, 5 months ago (2011-07-21 15:31:10 UTC) #2
agayev
http://codereview.chromium.org/7466031/diff/1017/net/base/async_host_resolver.cc File net/base/async_host_resolver.cc (right): http://codereview.chromium.org/7466031/diff/1017/net/base/async_host_resolver.cc#newcode69 net/base/async_host_resolver.cc:69: HostCache* CreateDefaultCache() { On 2011/07/21 15:31:10, cbentzel wrote: > ...
9 years, 5 months ago (2011-07-21 17:48:03 UTC) #3
cbentzel
9 years, 5 months ago (2011-07-21 18:22:15 UTC) #4
LGTM

http://codereview.chromium.org/7466031/diff/1017/net/base/async_host_resolver.cc
File net/base/async_host_resolver.cc (right):

http://codereview.chromium.org/7466031/diff/1017/net/base/async_host_resolver...
net/base/async_host_resolver.cc:327: // recreating info from DnsTransaction::Key
adds a lot of temporary
On 2011/07/21 17:48:03, agayev wrote:
> On 2011/07/21 15:31:10, cbentzel wrote:
> > It seems like it should still be possible to cache when requests is empty -
> > doesnt transaction->key() have enough information?
> 
> Well, it doesn't have host_resolver_flags, whose usefulness we need to
rethink. 
> This flag affects how the lookup is made, thus it affects how the AddressList
is
> formed.  In RR cache we would not store AddressList in cache, and
> AsyncHostResolver would look at flags and use data in RR cache to form the
> AddressList and pass it back.  E.g. if HOST_RESOLVER_CANONNAME is set, it
would
> set ai_canonname field of the first element of addrinfo chain to canonical
name
> of the host.

Yes, I agree that's how it would be done. I think holding off until a real RR
cache is in place is good.

http://codereview.chromium.org/7466031/diff/1017/net/base/async_host_resolver...
File net/base/async_host_resolver_unittest.cc (right):

http://codereview.chromium.org/7466031/diff/1017/net/base/async_host_resolver...
net/base/async_host_resolver_unittest.cc:201: // Now lookup |info0_| from cache
only, store results in |addrlist1_|,
On 2011/07/21 17:48:03, agayev wrote:
> On 2011/07/21 15:31:10, cbentzel wrote:
> > Could you add tests for cache expiration as well? 
> 
> Like creating a cache with 10ms TTL and then sleep and then make sure it is
> expired?  Doesn't that belong to HostCache unit test?

yeah, you're right.

Powered by Google App Engine
This is Rietveld 408576698