You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2020/12/03 19:36:25 UTC
[trafficserver] 02/07: Set thread mutex to the DNSHandler mutex of
SplitDNS (#7321)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 70174506a80ca5ab5ff23635d57cef11c0d37477
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Fri Nov 27 07:58:05 2020 +0900
Set thread mutex to the DNSHandler mutex of SplitDNS (#7321)
(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 d33c4dc..986d16b 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 49f5a99..08a0178 100644
--- a/iocore/dns/SplitDNS.cc
+++ b/iocore/dns/SplitDNS.cc
@@ -113,8 +113,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>();