]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Prevent a race when updating the TeeAction metrics
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 7 Apr 2021 10:11:10 +0000 (12:11 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 16 Apr 2021 07:10:52 +0000 (09:10 +0200)
pdns/dnsdist-lua-actions.cc

index f75372f46781bd9a3d9b72b292f47e71413c7e08..0cb97ec7494fc162ae20086bf6f94758270a60dd 100644 (file)
@@ -143,15 +143,15 @@ private:
   mutable std::atomic<unsigned long> d_senderrors{0};
   unsigned long d_recverrors{0};
   mutable std::atomic<unsigned long> 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<bool> d_pleaseQuit{false};
   bool d_addECS{false};
 };