Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist: Use a separate lock for accessing the pool's servers #6381

Merged
merged 1 commit into from Mar 26, 2018

Conversation

rgacogne
Copy link
Member

Short description

We used to hold the Lua lock while applying the load-balancing policy to select a backend, which is only needed by Lua policies, not core ones. We do need a lock to make sure that the vector of servers is not altered under our feet, but a per-pool read-write lock is enough and reduces contention a lot, especially when the maintenance thread is doing some heavy-lifting.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled and tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

We used to hold the Lua lock while applying the load-balancing policy
to select a backend, which is only needed by Lua policies, not core
ones. We do need a lock to make sure that the vector of servers is
not altered under our feet, but a per-pool read-write lock is enough
and reduces contention a lot, especially when the maintenance thread
is doing some heavy-lifting.
@rgacogne
Copy link
Member Author

This PR supersedes #6190.

@pieterlexis pieterlexis merged commit 0a1c8d0 into PowerDNS:master Mar 26, 2018
@rgacogne rgacogne deleted the dnsdist-serverpool-mutex branch March 26, 2018 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants