From a6338e924e29d318e7a1e971b5bde23f36d083af Mon Sep 17 00:00:00 2001 From: cedar-gao <58173839+cedar-gao@users.noreply.github.com> Date: Tue, 2 Jul 2024 20:08:56 +0800 Subject: [PATCH] optimize the performance for high qps (#6767) Signed-off-by: gaoxuesong --- plugin/etcd/handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/etcd/handler.go b/plugin/etcd/handler.go index 5a99753d0..72222dd2a 100644 --- a/plugin/etcd/handler.go +++ b/plugin/etcd/handler.go @@ -71,8 +71,8 @@ func (e *Etcd) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) ( m.SetReply(r) m.Truncated = truncated m.Authoritative = true - m.Answer = append(m.Answer, records...) - m.Extra = append(m.Extra, extra...) + m.Answer = records + m.Extra = extra w.WriteMsg(m) return dns.RcodeSuccess, nil