max-adb-size is no more.
1073. [bug] The adb cache should also be space driven.
[RT #1915, #1938]
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: config.c,v 1.17 2001/10/25 04:57:37 marka Exp $ */
|
||||
/* $Id: config.c,v 1.18 2001/11/07 03:52:15 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -116,7 +116,6 @@ options {\n\
|
||||
max-ncache-ttl 10800; /* 3 hours */\n\
|
||||
max-cache-ttl 604800; /* 1 week */\n\
|
||||
transfer-format many-answers;\n\
|
||||
max-adb-size 0;\n\
|
||||
max-cache-size 0;\n\
|
||||
check-names master ignore;\n\
|
||||
check-names slave ignore;\n\
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: server.c,v 1.358 2001/10/29 19:30:11 gson Exp $ */
|
||||
/* $Id: server.c,v 1.359 2001/11/07 03:52:16 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -646,32 +646,13 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
|
||||
dns_dispatch_detach(&dispatch6);
|
||||
|
||||
/*
|
||||
* Set ADB cache size
|
||||
* Set the ADB cache size to 1/8th of the max-cache-size.
|
||||
*/
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "max-adb-size", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
if (cfg_obj_isstring(obj)) {
|
||||
str = cfg_obj_asstring(obj);
|
||||
INSIST(strcasecmp(str, "unlimited") == 0);
|
||||
max_adb_size = ISC_UINT32_MAX;
|
||||
} else {
|
||||
isc_resourcevalue_t value;
|
||||
value = cfg_obj_asuint64(obj);
|
||||
if (value > ISC_UINT32_MAX) {
|
||||
cfg_obj_log(obj, ns_g_lctx, ISC_LOG_ERROR,
|
||||
"'max-adb-size "
|
||||
"%" ISC_PRINT_QUADFORMAT "d' is too large",
|
||||
value);
|
||||
result = ISC_R_RANGE;
|
||||
goto cleanup;
|
||||
}
|
||||
max_adb_size = (isc_uint32_t)value;
|
||||
if (max_adb_size == 0 && max_cache_size != 0) {
|
||||
max_adb_size = max_cache_size/8;
|
||||
if (max_adb_size == 0)
|
||||
max_adb_size = 1; /* Force minimum. */
|
||||
}
|
||||
max_adb_size = 0;
|
||||
if (max_cache_size != 0) {
|
||||
max_adb_size = max_cache_size/8;
|
||||
if (max_adb_size == 0)
|
||||
max_adb_size = 1; /* Force minimum. */
|
||||
}
|
||||
dns_adb_setadbsize(view->adb, max_adb_size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user