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

Convert dnsdist and the recursor to LockGuarded #10649

merged 32 commits into from Aug 18, 2021


Copy link

Short description

This PR is a subset of #10302, keeping only the parts related to dnsdist and the recursor, as the ones related to the authoritative server are larger and harder to review.


I have:

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

The general idea has been borrowed from Rust's locks: instead of
defining two objects, the one to be protected, T, and the lock, we
define a single LockGuarded<T> object which contains the object.
That provides two big advantages:
- it is immediately clear which data is protected by the lock
- that data simply can't be accessed without holding the lock.
Copy link

@omoerbeek omoerbeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a read-through of the previous PR without finding any worrying changes. I think it is time to put this in, so it can get some real-life testing.

@rgacogne rgacogne merged commit c28b235 into PowerDNS:master Aug 18, 2021
@rgacogne rgacogne deleted the lock-guarded-ddist branch August 18, 2021 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants