Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a272a2e authored by Luke Huang's avatar Luke Huang
Browse files

Change parallel_lookup flag name for preparing release

This feature is eabled by default, the relevant flag is only used for
emergency rollback if we found any unexpected negative
impact.

This change is required because we don't want to accidentally
enable/disable this feature in the devices will old module installed.

Bug: 171010645
Test: atest
Change-Id: I44e7d51eb17b446f7f4316b296e1bbeff6ba05aa
parent d4db011b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ class Experiments {
    // TODO: Migrate other experiment flags to here.
    // (retry_count, retransmission_time_interval)
    static constexpr const char* const kExperimentFlagKeyList[] = {
            "keep_listening_udp", "parallel_lookup",     "parallel_lookup_sleep_time",
            "keep_listening_udp", "parallel_lookup_release", "parallel_lookup_sleep_time",
            "sort_nameservers",   "dot_async_handshake",     "dot_connect_timeout_ms",
            "dot_maxtries",
    };
+1 −1
Original line number Diff line number Diff line
@@ -1710,7 +1710,7 @@ static int res_queryN_parallel(const char* name, res_target* target, res_state r

static int res_queryN_wrapper(const char* name, res_target* target, res_state res, int* herrno) {
    const bool parallel_lookup =
            android::net::Experiments::getInstance()->getFlag("parallel_lookup", 1);
            android::net::Experiments::getInstance()->getFlag("parallel_lookup_release", 1);
    if (parallel_lookup) return res_queryN_parallel(name, target, res, herrno);

    return res_queryN(name, target, res, herrno);
+2 −2
Original line number Diff line number Diff line
@@ -5301,7 +5301,7 @@ TEST_F(ResolverTest, GetAddrInfoParallelLookupTimeout) {
    neverRespondDns.setResponseProbability(0.0);
    StartDns(neverRespondDns, records);
    ScopedSystemProperties scopedSystemProperties(
            "persist.device_config.netd_native.parallel_lookup", "1");
            "persist.device_config.netd_native.parallel_lookup_release", "1");
    // The default value of parallel_lookup_sleep_time should be very small
    // that we can ignore in this test case.
    // Re-setup test network to make experiment flag take effect.
@@ -5336,7 +5336,7 @@ TEST_F(ResolverTest, GetAddrInfoParallelLookupSleepTime) {
    test::DNSResponder dns(listen_addr);
    StartDns(dns, records);
    ScopedSystemProperties scopedSystemProperties1(
            "persist.device_config.netd_native.parallel_lookup", "1");
            "persist.device_config.netd_native.parallel_lookup_release", "1");
    constexpr int PARALLEL_LOOKUP_SLEEP_TIME_MS = 500;
    ScopedSystemProperties scopedSystemProperties2(
            "persist.device_config.netd_native.parallel_lookup_sleep_time",