From 7ac6d2edcd93f8d12201b06df8914e247342d58c Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 7 Apr 2021 12:11:10 +0200 Subject: [PATCH] dnsdist: Prevent a race when updating the TeeAction metrics --- pdns/dnsdist-lua-actions.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pdns/dnsdist-lua-actions.cc b/pdns/dnsdist-lua-actions.cc index f75372f467..0cb97ec749 100644 --- a/pdns/dnsdist-lua-actions.cc +++ b/pdns/dnsdist-lua-actions.cc @@ -143,15 +143,15 @@ private: mutable std::atomic d_senderrors{0}; unsigned long d_recverrors{0}; mutable std::atomic d_queries{0}; - unsigned long d_responses{0}; - unsigned long d_nxdomains{0}; - unsigned long d_servfails{0}; - unsigned long d_refuseds{0}; - unsigned long d_formerrs{0}; - unsigned long d_notimps{0}; - unsigned long d_noerrors{0}; - mutable unsigned long d_tcpdrops{0}; - unsigned long d_otherrcode{0}; + stat_t d_responses{0}; + stat_t d_nxdomains{0}; + stat_t d_servfails{0}; + stat_t d_refuseds{0}; + stat_t d_formerrs{0}; + stat_t d_notimps{0}; + stat_t d_noerrors{0}; + mutable stat_t d_tcpdrops{0}; + stat_t d_otherrcode{0}; std::atomic d_pleaseQuit{false}; bool d_addECS{false}; }; -- 2.47.2