]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Make the Lua FFI per-thread counters atomic
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 30 Jun 2021 16:26:02 +0000 (18:26 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 30 Jun 2021 16:26:02 +0000 (18:26 +0200)
commit3f5e84ef2bdf1c6b22bf25dd9704e5cc0668cfbf
tree244ea15e715b22979a2b97d1fd6e0cf4fac52afb
parent1bda8c253e854100b8e1674ef53fc53c2bc68271
dnsdist: Make the Lua FFI per-thread counters atomic

We should not actually need that since the rules and actions are
either created sequentially at configuration time or via the console
at runtime, which requires holding the global Lua lock.
Still we don't care about performance when creating these objects
so let's just use an atomic counter instead.
pdns/dnsdist-lua-actions.cc
pdns/dnsdistdist/dnsdist-rules.cc
pdns/dnsdistdist/dnsdist-rules.hh