This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/8.1.x by this push:
     new c82304c  Set thread mutex to the DNSHandler mutex of SplitDNS (#7321) 
(#7371)
c82304c is described below

commit c82304c948934e628ef0ed3736186a4b2f4a1636
Author: Masaori Koshiba <[email protected]>
AuthorDate: Mon Feb 15 12:17:08 2021 +0900

    Set thread mutex to the DNSHandler mutex of SplitDNS (#7321) (#7371)
    
    (cherry picked from commit 3f11f151db24ec92ea0af61197401e5b10144e27)
---
 iocore/dns/DNS.cc      | 1 +
 iocore/dns/SplitDNS.cc | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/iocore/dns/DNS.cc b/iocore/dns/DNS.cc
index 9610027..3f3b83e 100644
--- a/iocore/dns/DNS.cc
+++ b/iocore/dns/DNS.cc
@@ -239,6 +239,7 @@ DNSProcessor::start(int, size_t stacksize)
   dns_failover_try_period = dns_timeout + 1; // Modify the "default" 
accordingly
 
   if (SplitDNSConfig::gsplit_dns_enabled) {
+    SplitDNSConfig::dnsHandler_mutex = thread->mutex;
     // reconfigure after threads start
     SplitDNSConfig::reconfigure();
   }
diff --git a/iocore/dns/SplitDNS.cc b/iocore/dns/SplitDNS.cc
index 8e076af..c139e82 100644
--- a/iocore/dns/SplitDNS.cc
+++ b/iocore/dns/SplitDNS.cc
@@ -114,8 +114,6 @@ SplitDNSConfig::release(SplitDNS *params)
 void
 SplitDNSConfig::startup()
 {
-  dnsHandler_mutex = new_ProxyMutex();
-
   // startup just check gsplit_dns_enabled
   REC_ReadConfigInt32(gsplit_dns_enabled, "proxy.config.dns.splitDNS.enabled");
   SplitDNSConfig::splitDNSUpdate = new ConfigUpdateHandler<SplitDNSConfig>();

Reply via email to