]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Make the round-robin LB policy internal counter atomic 16241/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Oct 2025 08:18:40 +0000 (10:18 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Oct 2025 08:18:40 +0000 (10:18 +0200)
commit1ad48b108eadbe260c16443c1feaf393a2c1324b
tree9e68456d0e68abbcdcbf43006d03d56c1eb12754
parentd1001ae3c653f9117bbf0b9fff23337664d8cf61
dnsdist: Make the round-robin LB policy internal counter atomic

Otherwise TSAN is rightfully complaining that there is a data race
because several threads are updating at the same time. While the
impact of this counter being corrupted is almost zero, and there is
an actual overhead to making it atomic, I believe this is the only
correct way to ensure the expected behaviour of this policy.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/dnsdist-lbpolicies.cc