As we want to directly modify the ZoneTable in ZoneReloaderLocal
(because it is memory-type dependant), we don't need the InstallAction
for anything. If we don't need it, we don't pass it as constructor
parameter -- it'll be called from a factory anyway and the factory may
know we don't need it.
Also adding a setTable() method to ZoneTableHeader. The header had no
way to specify the table currently and we need it for the tests. The
method is currently tentative, we'll probably replace it by something.
We allocate the ZoneData in the LoadAction, to match what happens in
ticket #2268 -- there's a function to load zone which allocates it
itself, we want to use it.
Jelte Jansen [Fri, 12 Oct 2012 12:19:19 +0000 (14:19 +0200)]
[2349] clean up ForwardQuery objects in tests
an attempt to clean up memory; ForwardQuery objects are supposed to delete themselves when they are no longer needed, but due to the direct calls in tests this often does not happen.
To keep internals in recursive_query to a minimum, I did add something to the API; ForwardQuery is now a public class, a pointer of which is returned by RecursiveQuery::forward. Tests that mess around can then delete the query themselves, and the way these are handled does not have to be changed.
Ideally, we should however not need unscoped allocated memory in the first place; we either need to use a centrally managed pool of objects to (re)use, or we need to change the entire design that needs these objects in the first place.
However, these are both non-trivial, and probably better suited in the main resolver work that has been planned.
JINMEI Tatuya [Tue, 9 Oct 2012 20:17:59 +0000 (13:17 -0700)]
[2339] changed the search order of python executable: seek python3.x first.
this works around a bit awkward installation setup where there's a link
from "python3" to "python3.x" but not from "python3-config" to the
corresponding "python3.x-config". That happens for recent versions of
Homebrew.
JINMEI Tatuya [Fri, 5 Oct 2012 05:19:27 +0000 (22:19 -0700)]
[2244] rename Componet.running() is_running() for consistency.
this branch introduced is_failed() (and failed() was already defined for
a different a purpose), so for consistency it would be better to name
the running version is_xxx too.
JINMEI Tatuya [Fri, 5 Oct 2012 00:27:15 +0000 (17:27 -0700)]
[2244] added a test case that reproduces one aspect of the problem.
the configurator should be able to delete a component to be removed
even if the it's failing (unexpectedly). The current implementation
doesn't handle that condition correctly.
JINMEI Tatuya [Sat, 6 Oct 2012 00:04:28 +0000 (17:04 -0700)]
[2204] cleanup: removed unused func, and renamed "ClientList" with "DataSrc".
getClientListClasses() was removed. It's not used anymore.
a few methods named with "ClientList" were renamed with adding "DataSrc".
The resulting names are a bit long, but since there's no namespace
qualification, simply saying "client" can be confusing (it could be
interpreted to mean DNS clients, for example).
JINMEI Tatuya [Fri, 5 Oct 2012 23:02:01 +0000 (16:02 -0700)]
[2204] completely replaced setClientList with swapDataSrcClientLists.
the test cases using setClientList were updated so they use
swapDataSrcClientLists (some of them work as a test for the "swap" itself).
now we don't need setClientList, so it was removed.
JINMEI Tatuya [Fri, 5 Oct 2012 22:15:18 +0000 (15:15 -0700)]
[2204] simplify configureDataSource by always creating a new lists and swap.
so we don't have to worry about what are in the current lists or rollback
operations.
swapDataSrcClientLists() is newly introduced for AuthSrv. No direc tests
yet (technically bad in terms TDD but the definition is very simple), which
will be provided in the next step.
the lock is now moved inside swapDataSrcClientLists().
note: even though this version builds everything, the amount of work
should be mostly the same because the only save is to create the empty
ClientList when the new and old have the same class of client. The expensive
part is ClientList::configure(). This version doesn't need any more call
to configure() than the old version.
Instead of releasing it directly. While the internal release was more
convenient, it didn't allow for swapping things fast under a mutex and
then spending the time releasing it unlocked.