forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reland "DnsConfigServiceWin::ConfigReader: Add cap on the number of r…
…etries" This is a reland of 180c0ad 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 5813733 > > 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 <Erik.Anderson@microsoft.com> > > Reviewed-by: Eric Orth <ericorth@chromium.org> > > 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 <ricea@chromium.org> > Commit-Queue: Erik Anderson <Erik.Anderson@microsoft.com> > 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 <ricea@chromium.org> Commit-Queue: Erik Anderson <Erik.Anderson@microsoft.com> Cr-Commit-Position: refs/heads/main@{#977705}
- Loading branch information
1 parent
a45390f
commit d328a54
Showing
9 changed files
with
248 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.