]> git.ipfire.org Git - thirdparty/pdns.git/commit
fixes PowerDNS/pdns#650
authorMark Zealey <mark@markandruth.co.uk>
Mon, 2 Dec 2013 08:57:42 +0000 (10:57 +0200)
committerMark Zealey <mark@markandruth.co.uk>
Mon, 2 Dec 2013 08:57:42 +0000 (10:57 +0200)
commitad7d9cd065b288a6f59bcb2628aa4ffcd278c7cd
tree5a1fab1c781fc2d583033c490c132659163ff63c
parent7874ab05a2073a1bfaea6180bbf2ef01afde9cfd
fixes PowerDNS/pdns#650

The attached patch changes the distributor code in the following ways:

1) Remove (as far as i can see) unused functions which allow for the fetching of the answer from an answers queue. I struggle to understand why this would ever be useful compared to having a callback; it also reduces code complexity and removes some locks. Also allows (2):
2) Split into 3 classes - the new ones being SingleThreadDistributor and MultiThreadDistributor - removes some of the conditional statements. It also means that in distributor-threads=1 mode, NO additional distributor threads are forked (unlike the existing code), and the class will also use less memory and generally be more efficient.

This has been tested in that the pdns server starts up and answers questions correctly in both modes, it's more of an RFC attempt to clean up the code a bit.
pdns/common_startup.cc
pdns/distributor.hh