From ac524e72f8cf9d087d0e266e15028b1cdd3ceb5e Mon Sep 17 00:00:00 2001 From: Valentin Gosu Date: Tue, 9 Feb 2021 14:22:56 +0000 Subject: [PATCH] Bug 1691721 - Remove early partial DNS records prefs r=necko-reviewers,kershaw These prefs were mostly a perf improvement - return the first address family first then merge the result with the other family. However, this turned out to cause intermittent issues on some sites, so it was turned off by default. Removing these prefs allows us to have the same functionality across all our resolvers - one request means one callback after both A and AAAA responses have been received. Differential Revision: https://phabricator.services.mozilla.com/D99757 --- modules/libpref/init/StaticPrefList.yaml | 14 -------------- netwerk/dns/TRRQuery.cpp | 20 ++------------------ 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index c38aa9ac53ea..74d7b791999c 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -8729,12 +8729,6 @@ value: false mirror: always -# Allow AAAA entries to be used "early", before the A results are in -- name: network.trr.early-AAAA - type: RelaxedAtomicBool - value: false - mirror: always - # When true, it only sends AAAA when the system has IPv6 connectivity - name: network.trr.skip-AAAA-when-not-supported type: RelaxedAtomicBool @@ -8748,14 +8742,6 @@ value: true mirror: always -# When true, the DNS request will wait for both A and AAAA responses -# (if both have been requested) before notifying the listeners. -# When true, it effectively cancels `network.trr.early-AAAA` -- name: network.trr.wait-for-A-and-AAAA - type: RelaxedAtomicBool - value: true - mirror: always - # Explicitly disable ECS (EDNS Client Subnet, RFC 7871) - name: network.trr.disable-ECS type: RelaxedAtomicBool diff --git a/netwerk/dns/TRRQuery.cpp b/netwerk/dns/TRRQuery.cpp index ae4879f02ae7..0af0c096473c 100644 --- a/netwerk/dns/TRRQuery.cpp +++ b/netwerk/dns/TRRQuery.cpp @@ -217,24 +217,8 @@ AHostResolver::LookupStatus TRRQuery::CompleteLookup( mFirstTRR.swap(newRRSet); // autoPtr.swap() MOZ_ASSERT(mFirstTRR && !newRRSet); - if (StaticPrefs::network_trr_wait_for_A_and_AAAA()) { - LOG(("CompleteLookup: waiting for all responses!\n")); - return LOOKUP_OK; - } - - if (pendingARequest && !StaticPrefs::network_trr_early_AAAA()) { - // This is an early AAAA with a pending A response. Allowed - // only by pref. - LOG(("CompleteLookup: avoiding early use of TRR AAAA!\n")); - return LOOKUP_OK; - } - - // we can do some callbacks with this partial result which requires - // a deep copy - newRRSet = mFirstTRR; - - // Increment mResolving so we wait for the next resolve too. - rec->mResolving++; + LOG(("CompleteLookup: waiting for all responses!\n")); + return LOOKUP_OK; } else { // no more outstanding TRRs // If mFirstTRR is set, merge those addresses into current set!