Skip to content

Conversation

zjs604381586
Copy link
Contributor

@zjs604381586 zjs604381586 commented Jul 30, 2025

Short description

When reload-zones sets thread local variables, it aggregates two operations into one thread scheduling, and completes the setting of two variables in one function. Because both functions return nullptr, no memory leak occurs.

Checklist

I have:

  • read the CONTRIBUTING.md 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)
  • checked that this code was merged to master

@omoerbeek omoerbeek added the rec label Jul 30, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 16615247828

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • 48 unchanged lines in 12 files lost coverage.
  • Overall coverage decreased (-0.03%) to 65.845%

Files with Coverage Reduction New Missed Lines %
pdns/iputils.hh 1 78.76%
ext/json11/json11.cpp 2 62.65%
pdns/dnsdistdist/dnsdist-crypto.cc 2 75.72%
pdns/misc.cc 2 60.2%
pdns/sstuff.hh 2 57.14%
pdns/dnsdistdist/dnsdist-carbon.cc 3 62.33%
pdns/stubresolver.cc 3 77.02%
pdns/recursordist/lwres.cc 5 70.84%
pdns/dnsdistdist/dnsdist-tcp.cc 6 77.14%
pdns/remote_logger.cc 6 55.36%
Totals Coverage Status
Change from base Build 16614910507: -0.03%
Covered Lines: 127942
Relevant Lines: 165732

💛 - Coveralls

@omoerbeek omoerbeek self-requested a review July 30, 2025 07:12
@omoerbeek
Copy link
Member

Do you have any measurements it makes a real difference?

@zjs604381586
Copy link
Contributor Author

Do you have any measurements it makes a real difference?

I don't have actual test data. I understand that resetting two variables in one epoll schedule will definitely improve performance compared to scheduling twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants