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 counter to mark IDState usage instead of the FD #8154

merged 3 commits into from Aug 7, 2019


Copy link

@rgacogne rgacogne commented Aug 2, 2019

Short description

This change fixes a possible ABA issue and, coupled with stronger checks when updating the state, should reduce the likelihood of any issue when a state is reused from a different thread.

Needs a serious 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)
Copy link
Member Author

@rgacogne rgacogne commented Aug 5, 2019

Travis failures are unrelated (network issues, apparently).

Copy link

@chbruyand chbruyand left a comment


int origFD = ids.origFD;
if(origFD >=0 && ids.age++ > g_udpTimeout) {
/* We set origFD to -1 as soon as possible
int64_t usageIndicator = ids.usageIndicator;
Copy link

@chbruyand chbruyand Aug 6, 2019

Maybe use .load() ?

Copy link
Member Author

@rgacogne rgacogne Aug 6, 2019

Isn't that equivalent? Or do you think the use of .load() more readable, perhaps?

Copy link

@chbruyand chbruyand Aug 6, 2019

It is. That was just to match
(I'm fine without .load() anyway)

@rgacogne rgacogne merged commit 63c9e5e into PowerDNS:master Aug 7, 2019
26 of 27 checks passed
@rgacogne rgacogne deleted the dnsdist-outstanding-reset branch Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants