iteration self tuning. The covers nodes clean from
the cache per iteration, nodes written to disk when
rewriting a master file and nodes destroyed per
iteration when destroying a zone or a cache.
[RT #14996]
in revision 1.40 is clearly incorrect. If the cleaner is already in the busy state, a call to
incremental_cleaning_action() has already been scheduled as an event, and there is no
need to do an extra call. Furthermore, the call passed the timer event as an argument
to incremental_cleaning_action(), which would ultimately cause it to be passed
to end_cleanin() and assigned to cleaner->resched_event rather than freed.
This commit may or may not fix RT #1912.
wait at least six seconds between each pass of the tree. This keeps
the CPU from being bogged down in a persistent overlimit condition, and
because it uses timers also lets the cache cleaner know right away when
the server is being shut down, so it can stop trying to clean.
Also fixed an unlocked access to cache->live_tasks in dns_cache_detach().
Also fixed a problem with repeated calls to dns_cache_setcachesize() setting
the database as not overmem, even though it might have still been in
the process of cleaning from a previous limit. Just set the new
isc_mem_setwater() limits instead and let the mem.c call water() if cleaning
needs to be either started or stopped because of the new limits.
Minor code cleanups.
removes some unused code in view.c and uncomments some code in cache.c.
This still isn't really usable, since the trust level of cached data is
not persistent, so all data in the persistent cache will be promoted to
"ultimate" trust on reload.
Mostly, several functions that take pointers as arguments, almost
always char * pointers, had those pointers qualified with "const".
Those that returned pointers to previously const-qualified arguments
had their return values qualified as const. Some structure members
were qualified as const to retain that attribute from the variables
from which they were assigned.
The macro DE_CONST is used to deal with a handful of very special
places where something is qualified as const but really needs to have
its const qualifier removed.
rdata.c now defines macros for the prototypes of the basic rdata functions,
and all of the lib/dns/rdata/**/*.c files now use them.
Some minor integer-compatibility issues. (IE, ~0x03 is a signed int,
so assigning it to an unsigned int should use a cast. The type of an
enum member is int, so there are some conversion issues there, too.)
A pointers-to-function should not be cast to a pointer-to-object.
Variables should not be named for C reserved identifiers.
One or two set-but-not-used variables removed.
Minor other ISC style cleanups.
Cleanup of redundant/useless header file inclusion.
ISC style lint, primarily for function declarations and standalone
comments -- ie, those that appear on a line without any code, which
should be written as follows:
/*
* This is a comment.
*/