New issue
Advanced search Search tips

Issue 605149 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature



Sign in to add a comment

DNS: Persist useful data across network changes and app restarts

Project Member Reported by juliatut...@chromium.org, Apr 20 2016

Issue description

Right now, the DNS stack is very ephemeral. It does things like learning the RTT of the current network, but forgets all of this on a network change.

I'd like to experiment with persisting some of this data to see if we can get better performance, especially on varying types of mobile networks.
 

Comment 1 Deleted

Project Member

Comment 2 by bugdroid1@chromium.org, Jul 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d7fa5853a258f273864bd53dfbb9bb3c52e6dd1f

commit d7fa5853a258f273864bd53dfbb9bb3c52e6dd1f
Author: juliatuttle <juliatuttle@chromium.org>
Date: Fri Jul 29 13:16:57 2016

DNS: Add stubs for persisting data across restarts

I'm going to start experimenting with making certain data in the DNS
stack (cache, learned RTT, etc.) persist across restarts or network
type changes (e.g. on 2G -> 3G -> 2G, restore the previous 2G RTT
instead of starting over).

This CL adds the basic set of methods that will be called, but does not
add the code to include anything in the persisted data, nor the code to
actually persist the data outside the DNS stack.

BUG=605149

Review-Url: https://codereview.chromium.org/1898033006
Cr-Commit-Position: refs/heads/master@{#408624}

[modify] https://crrev.com/d7fa5853a258f273864bd53dfbb9bb3c52e6dd1f/net/dns/dns_client.cc
[modify] https://crrev.com/d7fa5853a258f273864bd53dfbb9bb3c52e6dd1f/net/dns/dns_client.h
[modify] https://crrev.com/d7fa5853a258f273864bd53dfbb9bb3c52e6dd1f/net/dns/dns_session.cc
[modify] https://crrev.com/d7fa5853a258f273864bd53dfbb9bb3c52e6dd1f/net/dns/dns_session.h
[modify] https://crrev.com/d7fa5853a258f273864bd53dfbb9bb3c52e6dd1f/net/dns/dns_socket_pool.h
[modify] https://crrev.com/d7fa5853a258f273864bd53dfbb9bb3c52e6dd1f/net/dns/dns_test_util.cc
[modify] https://crrev.com/d7fa5853a258f273864bd53dfbb9bb3c52e6dd1f/net/dns/dns_test_util.h
[modify] https://crrev.com/d7fa5853a258f273864bd53dfbb9bb3c52e6dd1f/net/dns/host_resolver.cc
[modify] https://crrev.com/d7fa5853a258f273864bd53dfbb9bb3c52e6dd1f/net/dns/host_resolver.h
[modify] https://crrev.com/d7fa5853a258f273864bd53dfbb9bb3c52e6dd1f/net/dns/host_resolver_impl.cc
[modify] https://crrev.com/d7fa5853a258f273864bd53dfbb9bb3c52e6dd1f/net/dns/host_resolver_impl.h

Owner: ----
Owner: mge...@chromium.org
Project Member

Comment 5 by bugdroid1@chromium.org, May 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/af3ec7bf5692ea667b3dccc3b6140fb8aae41ea7

commit af3ec7bf5692ea667b3dccc3b6140fb8aae41ea7
Author: mgersh <mgersh@chromium.org>
Date: Wed May 31 23:15:39 2017

Serialize and deserialize HostCache for persistence

HostCache was already being serialized for NetLog, but that code will
soon be needed for persistence as well, so move it into HostCache and
add the reverse operation.

BUG=605149

Review-Url: https://codereview.chromium.org/2791653002
Cr-Commit-Position: refs/heads/master@{#476083}

[modify] https://crrev.com/af3ec7bf5692ea667b3dccc3b6140fb8aae41ea7/net/dns/host_cache.cc
[modify] https://crrev.com/af3ec7bf5692ea667b3dccc3b6140fb8aae41ea7/net/dns/host_cache.h
[modify] https://crrev.com/af3ec7bf5692ea667b3dccc3b6140fb8aae41ea7/net/dns/host_cache_unittest.cc
[modify] https://crrev.com/af3ec7bf5692ea667b3dccc3b6140fb8aae41ea7/net/log/net_log_util.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/120380c724ca5748ec6b1822121ca038c0f139df

commit 120380c724ca5748ec6b1822121ca038c0f139df
Author: mgersh <mgersh@chromium.org>
Date: Fri Jun 16 18:25:27 2017

Make HostCache::RestoreFromListValue() take a const reference

This was a bug in https://codereview.chromium.org/2791653002/.

BUG=605149

Review-Url: https://codereview.chromium.org/2938183003
Cr-Commit-Position: refs/heads/master@{#480107}

[modify] https://crrev.com/120380c724ca5748ec6b1822121ca038c0f139df/net/dns/host_cache.cc
[modify] https://crrev.com/120380c724ca5748ec6b1822121ca038c0f139df/net/dns/host_cache.h

Project Member

Comment 7 by bugdroid1@chromium.org, Jun 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7c28e7988fef9bb3e03027226bd199736d99abc3

commit 7c28e7988fef9bb3e03027226bd199736d99abc3
Author: mgersh <mgersh@chromium.org>
Date: Tue Jun 20 23:13:11 2017

Add PersistenceDelegate to HostCache

PersistenceDelegate is a new interface for persisting the contents of
the HostCache. This commit includes the interface itself, the logic in
HostCache for interacting with it, and a mock implementation of the
interface for testing. It does not include support for immediate data
removal since that won't be needed for the currently planned use case.

BUG=605149

Review-Url: https://codereview.chromium.org/2943143002
Cr-Commit-Position: refs/heads/master@{#481015}

[modify] https://crrev.com/7c28e7988fef9bb3e03027226bd199736d99abc3/net/dns/host_cache.cc
[modify] https://crrev.com/7c28e7988fef9bb3e03027226bd199736d99abc3/net/dns/host_cache.h
[modify] https://crrev.com/7c28e7988fef9bb3e03027226bd199736d99abc3/net/dns/host_cache_unittest.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Jun 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/983dbf87d4b115593d648e58f86b336401945647

commit 983dbf87d4b115593d648e58f86b336401945647
Author: mgersh <mgersh@chromium.org>
Date: Fri Jun 23 20:17:06 2017

Add HostCachePersistenceManager for Cronet

HostCachePersistenceManager handles the interaction between HostCache
and prefs for persistence. It batches writes to avoid writing to prefs
too often. This implementation is Cronet-specific because it uses the
same sequence for interactions with network and prefs code.

BUG=605149
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester

Review-Url: https://codereview.chromium.org/2953483003
Cr-Commit-Position: refs/heads/master@{#482001}

[modify] https://crrev.com/983dbf87d4b115593d648e58f86b336401945647/components/cronet/android/BUILD.gn
[add] https://crrev.com/983dbf87d4b115593d648e58f86b336401945647/components/cronet/host_cache_persistence_manager.cc
[add] https://crrev.com/983dbf87d4b115593d648e58f86b336401945647/components/cronet/host_cache_persistence_manager.h
[add] https://crrev.com/983dbf87d4b115593d648e58f86b336401945647/components/cronet/host_cache_persistence_manager_unittest.cc
[modify] https://crrev.com/983dbf87d4b115593d648e58f86b336401945647/net/dns/host_cache.cc
[modify] https://crrev.com/983dbf87d4b115593d648e58f86b336401945647/net/dns/host_cache.h
[modify] https://crrev.com/983dbf87d4b115593d648e58f86b336401945647/net/dns/host_cache_unittest.cc
[modify] https://crrev.com/983dbf87d4b115593d648e58f86b336401945647/net/log/net_log_util.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Jun 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ac5f75a1f6948c9ace870d57c3df502e9ed802f5

commit ac5f75a1f6948c9ace870d57c3df502e9ed802f5
Author: mgersh <mgersh@chromium.org>
Date: Wed Jun 28 16:53:37 2017

Add Cronet experimental option for host cache persistence

Allows embedders to enable host cache persistence with their choice of
delay, and creates a HostCachePersistenceManager when the option is
enabled. Includes an integration test.

BUG=605149
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester

Review-Url: https://codereview.chromium.org/2954753002
Cr-Commit-Position: refs/heads/master@{#483024}

[modify] https://crrev.com/ac5f75a1f6948c9ace870d57c3df502e9ed802f5/components/cronet/android/BUILD.gn
[modify] https://crrev.com/ac5f75a1f6948c9ace870d57c3df502e9ed802f5/components/cronet/android/cronet_url_request_context_adapter.cc
[modify] https://crrev.com/ac5f75a1f6948c9ace870d57c3df502e9ed802f5/components/cronet/android/cronet_url_request_context_adapter.h
[modify] https://crrev.com/ac5f75a1f6948c9ace870d57c3df502e9ed802f5/components/cronet/android/test/cronet_test_jni.cc
[add] https://crrev.com/ac5f75a1f6948c9ace870d57c3df502e9ed802f5/components/cronet/android/test/experimental_options_test.cc
[add] https://crrev.com/ac5f75a1f6948c9ace870d57c3df502e9ed802f5/components/cronet/android/test/experimental_options_test.h
[modify] https://crrev.com/ac5f75a1f6948c9ace870d57c3df502e9ed802f5/components/cronet/android/test/javatests/src/org/chromium/net/ExperimentalOptionsTest.java
[modify] https://crrev.com/ac5f75a1f6948c9ace870d57c3df502e9ed802f5/components/cronet/url_request_context_config.cc
[modify] https://crrev.com/ac5f75a1f6948c9ace870d57c3df502e9ed802f5/components/cronet/url_request_context_config.h

Owner: ----
Status: Available (was: Started)

Sign in to add a comment