]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Make the round-robin LB policy internal counter atomic 16320/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Oct 2025 08:18:40 +0000 (10:18 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 20 Oct 2025 09:06:33 +0000 (11:06 +0200)
commitc7c72e0f57e63d1fd7b77edf19c171a21f555760
tree2894cf1a95cc30ad88baa0bc09226a066a8b5488
parent19d000291f91681a14718118581841bac32d4570
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>
(cherry picked from commit 1ad48b108eadbe260c16443c1feaf393a2c1324b)
pdns/dnsdistdist/dnsdist-lbpolicies.cc