commit | d328a54164118653cfc09a2e46543dc265c7e1ed | [log] [tgz] |
---|---|---|
author | Erik Anderson <[email protected]> | Fri Mar 04 17:35:30 2022 |
committer | Chromium LUCI CQ <[email protected]> | Fri Mar 04 17:35:30 2022 |
tree | 431f80c7438e615c07693619f0c2c337c5de2a9f | |
parent | a45390fa2daccb7f7eb6c1875a28a4d5b40de7df [diff] |
Reland "DnsConfigServiceWin::ConfigReader: Add cap on the number of retries" This is a reland of 180c0adceaddfddbb9bee6118bfaafe6eea49803 which itself was a reland. Test failures in an existing test (SerialWorkerTest.DeleteDuringWork) were seen in the win-asan builder which led to a revert. I was able to reproduce the issue locally even without this change, though it happened less frequently. The race involved the reply task not having completed even after the base::RunLoop().RunUntilIdle() call. To address it, I've moved to call WithTaskEnvironment::RunUntilIdle; I ran 100000 iterations and can no longer repro the issue. Original change's description: > Reland "DnsConfigServiceWin::ConfigReader: Add cap on the number of > retries" > > This is a reland of 58137339ca8bef42bbdc07a01078d294ef9f5a23 > > The prior commit encountered an esoteric race condition in the task > system. With the changes from https://crrev.com/c/3193150 and > https://crrev.com/c/3227011, I can no longer repro it (I previously > could). > > Original change's description: > > DnsConfigServiceWin::ConfigReader: Add cap on the number of retries > > > > Add retry logic to SerialWorker and remove the existing retry logic in > > DnsConfigServiceWin::ConfigReader in favor of using the SerialWorker > > functionality with new logic to cap the number of retries. > > > The DnsConfigServiceWin::ConfigReader retry logic was added in case of > > race conditions between getting registry change notifications and > > reading out DNS configuration from the OS. > > > When in an offline state, no DNS servers are available. Prior to this > > change, the ConfigReader wakes up every 5 seconds to try again which > > has a negative impact on performance and battery life since the CPU > > can't stay in a low power state. After this change, we will retry 3 > > times with a base delay of 5 seconds for the first retry and a 2x > > exponential backoff for each additional retry. > > > If a state change is seen (e.g. via the registry watchers and hosts > > file watcher), the retry count is reset. > > > Bug: 1225838 > > Change-Id: Idf801b1e2934649021df08dbfe9569fd81e7ae84 > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3036528 > > Commit-Queue: Erik Anderson <[email protected]> > > Reviewed-by: Eric Orth <[email protected]> > > Cr-Commit-Position: refs/heads/master@{#905004} > > Bug: 1225838 > Change-Id: I0e889515911660ec7dc5df50ddec18cf774ee1f0 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3093529 > Reviewed-by: Adam Rice <[email protected]> > Commit-Queue: Erik Anderson <[email protected]> > Cr-Commit-Position: refs/heads/main@{#973813} Bug: 1225838 Change-Id: I62be471bcc5864aca6494b5158f68af9df0c545d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3486516 Reviewed-by: Adam Rice <[email protected]> Commit-Queue: Erik Anderson <[email protected]> Cr-Commit-Position: refs/heads/main@{#977705}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.