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

Issue 1908543002: DNS: Retain stale entries in HostCache and return when requested (Closed)

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

Description

DNS: Retain stale entries in HostCache and return when requested In preparation for future connection optimizations, retain stale entries (those with a response past the TTL or received on a different network) in the cache, and expose a way to look up and characterize the stale results. To do this, HostCache moves away from using ExpiringCache to a self- managed map of keys to entries, with extra metadata. Also, add a bunch of histograms measuring how stale updated entries are. BUG=605138 Committed: https://crrev.com/317860ed4f3e3788fd3c4637ee5d91afd31e39b1 Cr-Commit-Position: refs/heads/master@{#393246}

Patch Set 1 #

Patch Set 2 : Add more histograms. #

Patch Set 3 : Rebase, flesh out histograms, update histograms.xml. #

Patch Set 4 : rebase, move FindDeltaType to dns_util, reformat #

Patch Set 5 : Tweak histogram recording. #

Patch Set 6 : rebase, tweak histograms a bit #

Total comments: 10

Patch Set 7 : make requested changes, and some others, and rebase #

Total comments: 6

Patch Set 8 : Tweak histograms per asvitkine's suggestions. #

Total comments: 48

Patch Set 9 : Make requested changes. #

Total comments: 8

Patch Set 10 : Make requested changes. #

Total comments: 4

Patch Set 11 : Rebase and rearrange .h slightly per sleevi's suggestion. #

Total comments: 18

Patch Set 12 : vertical whitespace tweak #

Patch Set 13 : Make requested changes; notably, merge Entry{,Internal}. #

Total comments: 8

Patch Set 14 : Make a few more requested changes #

Patch Set 15 : rebase #

Patch Set 16 : Make a few more changes (discussed IRL) #

Total comments: 1

Patch Set 17 : rebase, make all members of Entry private #

Unified diffs Side-by-side diffs Delta from patch set Stats (+663 lines, -94 lines) Patch
M net/dns/dns_util.h View 1 2 3 4 5 6 2 chunks +21 lines, -0 lines 0 comments Download
M net/dns/dns_util.cc View 1 2 3 2 chunks +32 lines, -0 lines 0 comments Download
M net/dns/host_cache.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +97 lines, -29 lines 0 comments Download
M net/dns/host_cache.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +257 lines, -40 lines 0 comments Download
M net/dns/host_cache_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +101 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 15 16 3 chunks +9 lines, -9 lines 0 comments Download
M net/dns/host_resolver_mojo.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -2 lines 0 comments Download
M net/dns/mock_host_resolver.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -2 lines 0 comments Download
M net/log/net_log_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +9 lines, -10 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +133 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 34 (8 generated)
Julia Tuttle
PTAL, rdsmith.
4 years, 8 months ago (2016-04-26 02:00:32 UTC) #4
Julia Tuttle
asvitkine, PTAL at histograms.
4 years, 8 months ago (2016-04-26 02:11:48 UTC) #6
Ryan Sleevi
Drive bys. The O(N^M) performance is bleh, but maybe it's too small to matter? Seems ...
4 years, 8 months ago (2016-04-26 02:18:22 UTC) #8
Julia Tuttle
https://codereview.chromium.org/1908543002/diff/100001/net/dns/dns_util.h File net/dns/dns_util.h (right): https://codereview.chromium.org/1908543002/diff/100001/net/dns/dns_util.h#newcode45 net/dns/dns_util.h:45: // Used in histograms; please only insert new entries ...
4 years, 7 months ago (2016-04-27 14:47:04 UTC) #9
Alexei Svitkine (slow)
https://codereview.chromium.org/1908543002/diff/120001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1908543002/diff/120001/tools/metrics/histograms/histograms.xml#newcode8727 tools/metrics/histograms/histograms.xml:8727: +<histogram name="DNS.HostCacheClearStaleExpiredBy" units="ms"> Nit: I suggest adding an intermediate ...
4 years, 7 months ago (2016-04-27 15:45:34 UTC) #10
Julia Tuttle
https://codereview.chromium.org/1908543002/diff/120001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1908543002/diff/120001/tools/metrics/histograms/histograms.xml#newcode8727 tools/metrics/histograms/histograms.xml:8727: +<histogram name="DNS.HostCacheClearStaleExpiredBy" units="ms"> On 2016/04/27 at 15:45:33, Alexei Svitkine ...
4 years, 7 months ago (2016-04-27 21:36:22 UTC) #11
Alexei Svitkine (slow)
lgtm
4 years, 7 months ago (2016-04-27 22:05:05 UTC) #12
Ryan Sleevi
https://codereview.chromium.org/1908543002/diff/140001/net/dns/host_cache.cc File net/dns/host_cache.cc (right): https://codereview.chromium.org/1908543002/diff/140001/net/dns/host_cache.cc#newcode305 net/dns/host_cache.cc:305: base::ListValue* entry_list = new base::ListValue(); better to use scoped_ptr<base::ListValue> ...
4 years, 7 months ago (2016-04-28 01:44:25 UTC) #13
Randy Smith (Not in Mondays)
First round of comments. https://codereview.chromium.org/1908543002/diff/140001/net/dns/dns_util.cc File net/dns/dns_util.cc (right): https://codereview.chromium.org/1908543002/diff/140001/net/dns/dns_util.cc#newcode196 net/dns/dns_util.cc:196: AddressListDeltaType FindAddressListDeltaType(const AddressList& a, This ...
4 years, 7 months ago (2016-04-28 16:24:16 UTC) #14
Julia Tuttle
PTAL. https://codereview.chromium.org/1908543002/diff/140001/net/dns/dns_util.cc File net/dns/dns_util.cc (right): https://codereview.chromium.org/1908543002/diff/140001/net/dns/dns_util.cc#newcode196 net/dns/dns_util.cc:196: AddressListDeltaType FindAddressListDeltaType(const AddressList& a, On 2016/04/28 at 16:24:16, ...
4 years, 7 months ago (2016-04-29 17:33:52 UTC) #15
Ryan Sleevi
I'll let Randy drive the rest. https://codereview.chromium.org/1908543002/diff/160001/net/dns/host_cache.cc File net/dns/host_cache.cc (right): https://codereview.chromium.org/1908543002/diff/160001/net/dns/host_cache.cc#newcode280 net/dns/host_cache.cc:280: // TODO(juliatuttle): Remember ...
4 years, 7 months ago (2016-04-29 23:09:38 UTC) #16
Julia Tuttle
PTAL. https://codereview.chromium.org/1908543002/diff/160001/net/dns/host_cache.cc File net/dns/host_cache.cc (right): https://codereview.chromium.org/1908543002/diff/160001/net/dns/host_cache.cc#newcode280 net/dns/host_cache.cc:280: // TODO(juliatuttle): Remember some old metadata, if it's ...
4 years, 7 months ago (2016-05-03 20:36:19 UTC) #18
Ryan Sleevi
One last style nit. THanks for bearing through the style chime-in. I mostly focused on ...
4 years, 7 months ago (2016-05-04 01:12:34 UTC) #19
Julia Tuttle
Thanks for all the style help, rsleevi! PTAL, rdsmith. https://codereview.chromium.org/1908543002/diff/200001/net/dns/host_cache.h File net/dns/host_cache.h (right): https://codereview.chromium.org/1908543002/diff/200001/net/dns/host_cache.h#newcode131 net/dns/host_cache.h:131: ...
4 years, 7 months ago (2016-05-04 14:33:16 UTC) #20
Randy Smith (Not in Mondays)
Next round of comments. I'm going to wait on the documentation I requested to review ...
4 years, 7 months ago (2016-05-04 18:15:25 UTC) #21
Julia Tuttle
PTAL. https://codereview.chromium.org/1908543002/diff/220001/net/dns/host_cache.cc File net/dns/host_cache.cc (right): https://codereview.chromium.org/1908543002/diff/220001/net/dns/host_cache.cc#newcode31 net/dns/host_cache.cc:31: struct HostCache::EntryInternal : public HostCache::Entry { On 2016/05/04 ...
4 years, 7 months ago (2016-05-05 14:35:53 UTC) #22
Randy Smith (Not in Mondays)
I think once we resolve these issues, I'm good. https://codereview.chromium.org/1908543002/diff/140001/net/dns/host_cache.h File net/dns/host_cache.h (right): https://codereview.chromium.org/1908543002/diff/140001/net/dns/host_cache.h#newcode137 net/dns/host_cache.h:137: ...
4 years, 7 months ago (2016-05-05 20:41:51 UTC) #23
Julia Tuttle
The private data we're sharing with netlog is the actual expiration time. Callers can get ...
4 years, 7 months ago (2016-05-06 18:32:43 UTC) #24
Julia Tuttle
PTAL, rdsmith.
4 years, 7 months ago (2016-05-10 00:09:20 UTC) #25
Randy Smith (Not in Mondays)
LGTM modulo issue below. (I could probably be persuaded to stamp without it, but I ...
4 years, 7 months ago (2016-05-11 19:37:54 UTC) #26
Julia Tuttle
On 2016/05/11 19:37:54, Randy Smith - Not in Fridays wrote: > LGTM modulo issue below. ...
4 years, 7 months ago (2016-05-11 20:13:18 UTC) #27
Randy Smith (Not in Mondays)
LGTM.
4 years, 7 months ago (2016-05-11 20:17:36 UTC) #28
Alexei Svitkine (slow)
still lgtm
4 years, 7 months ago (2016-05-11 22:38:26 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1908543002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1908543002/340001
4 years, 7 months ago (2016-05-12 14:44:12 UTC) #31
commit-bot: I haz the power
Committed patchset #17 (id:340001)
4 years, 7 months ago (2016-05-12 14:47:36 UTC) #32
commit-bot: I haz the power
4 years, 7 months ago (2016-05-12 14:48:35 UTC) #34
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/317860ed4f3e3788fd3c4637ee5d91afd31e39b1
Cr-Commit-Position: refs/heads/master@{#393246}

Powered by Google App Engine
This is Rietveld 408576698