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

Issue 2083643003: DNS: Let requests specify a callback for future cache hits (Closed)

Created:
4 years, 6 months ago by Julia Tuttle
Modified:
4 years, 4 months ago
Reviewers:
Charlie Harrison
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DNS: Let requests specify a callback for future cache hits To measure the effectiveness of various speculative DNS measures, allow DNS requests to contain a cache hit callback that will be called every time another request returns synchronously with cached data from the same entry that the original request wrote or read. To clarify, here's an example sequence of operations (assuming all requests have callbacks set): 1. Request A resolves a name. 2. Request B resolves the same name while the result is still valid; the resolver calls request A's cache hit callback. 3. Request C resolves the same name again; the resolver calls the callbacks for both request A and B. 4. The cache is cleared on a network change. 5. Requests D and E both resolve the name. No callbacks are called, since there was no result cached for either request. 6. Request F resolves the name; the resolver calls the callbacks for requests D and E. Notably, if multiple speculative resolutions occur, the cache hit callbacks pile up, and future cache hits will call *all* of them. BUG=621554 Committed: https://crrev.com/7e8bf1c42475e7bf0cf31a0cbda952cb6cae5f99 Cr-Commit-Position: refs/heads/master@{#409262}

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : rebase #

Total comments: 8

Patch Set 4 : Make requested changes. #

Total comments: 3

Patch Set 5 : rebase, add unit test. #

Total comments: 4

Patch Set 6 : Clarify a couple comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+206 lines, -14 lines) Patch
M net/dns/host_cache.h View 3 chunks +6 lines, -0 lines 0 comments Download
M net/dns/host_cache.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M net/dns/host_cache_unittest.cc View 1 chunk +51 lines, -0 lines 0 comments Download
M net/dns/host_resolver.h View 1 2 3 4 3 chunks +16 lines, -0 lines 0 comments Download
M net/dns/host_resolver.cc View 1 2 3 4 1 chunk +17 lines, -2 lines 0 comments Download
M net/dns/host_resolver_impl.h View 1 2 3 4 2 chunks +12 lines, -2 lines 0 comments Download
M net/dns/host_resolver_impl.cc View 1 2 3 4 9 chunks +43 lines, -10 lines 0 comments Download
M net/dns/host_resolver_impl_unittest.cc View 1 2 3 4 5 1 chunk +59 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (25 generated)
Julia Tuttle
PTAL, csharrison.
4 years, 5 months ago (2016-07-25 19:32:28 UTC) #9
Charlie Harrison
Looks good! https://codereview.chromium.org/2083643003/diff/40001/net/dns/host_resolver.cc File net/dns/host_resolver.cc (right): https://codereview.chromium.org/2083643003/diff/40001/net/dns/host_resolver.cc#newcode93 net/dns/host_resolver.cc:93: HostResolver::RequestInfo::RequestInfo(const HostPortPair& host_port_pair) Can this constructor call ...
4 years, 4 months ago (2016-07-26 13:41:13 UTC) #12
Julia Tuttle
PTAL, csharrison. https://codereview.chromium.org/2083643003/diff/40001/net/dns/host_resolver.cc File net/dns/host_resolver.cc (right): https://codereview.chromium.org/2083643003/diff/40001/net/dns/host_resolver.cc#newcode93 net/dns/host_resolver.cc:93: HostResolver::RequestInfo::RequestInfo(const HostPortPair& host_port_pair) On 2016/07/26 13:41:13, csharrison ...
4 years, 4 months ago (2016-07-26 17:51:24 UTC) #15
Charlie Harrison
Thanks! Can you add a test for the cache hit case? https://codereview.chromium.org/2083643003/diff/60001/net/dns/host_resolver.cc File net/dns/host_resolver.cc (right): ...
4 years, 4 months ago (2016-07-26 18:52:15 UTC) #16
Julia Tuttle
PTAL, csharrison. https://codereview.chromium.org/2083643003/diff/60001/net/dns/host_resolver.cc File net/dns/host_resolver.cc (right): https://codereview.chromium.org/2083643003/diff/60001/net/dns/host_resolver.cc#newcode95 net/dns/host_resolver.cc:95: host_port_pair_ = host_port_pair; On 2016/07/26 18:52:15, csharrison ...
4 years, 4 months ago (2016-08-02 16:56:04 UTC) #23
Charlie Harrison
Few questions: https://codereview.chromium.org/2083643003/diff/60001/net/dns/host_resolver.cc File net/dns/host_resolver.cc (right): https://codereview.chromium.org/2083643003/diff/60001/net/dns/host_resolver.cc#newcode95 net/dns/host_resolver.cc:95: host_port_pair_ = host_port_pair; On 2016/08/02 16:56:04, Julia ...
4 years, 4 months ago (2016-08-02 17:15:41 UTC) #24
Julia Tuttle
PTAL, csharrison. https://codereview.chromium.org/2083643003/diff/80001/net/dns/host_resolver_impl_unittest.cc File net/dns/host_resolver_impl_unittest.cc (right): https://codereview.chromium.org/2083643003/diff/80001/net/dns/host_resolver_impl_unittest.cc#newcode2441 net/dns/host_resolver_impl_unittest.cc:2441: // Make an uncached request to clear ...
4 years, 4 months ago (2016-08-02 17:22:50 UTC) #27
Charlie Harrison
lgtm!!!
4 years, 4 months ago (2016-08-02 17:23:45 UTC) #28
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/2083643003/100001
4 years, 4 months ago (2016-08-02 19:03:41 UTC) #32
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 4 months ago (2016-08-02 19:09:24 UTC) #34
commit-bot: I haz the power
4 years, 4 months ago (2016-08-02 19:10:40 UTC) #36
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/7e8bf1c42475e7bf0cf31a0cbda952cb6cae5f99
Cr-Commit-Position: refs/heads/master@{#409262}

Powered by Google App Engine
This is Rietveld 408576698