mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 05:09:59 -04:00
remove obsolete dns_db_hashsize()
this function's purpose was to populate the "CacheBuckets" statistic, but there are no databases left that implemented it, so the return value was always 0. "CacheBuckets" has now been removed from the statistics, and the dns_db_hashsize() API call has been removed.
This commit is contained in:
parent
0222c385aa
commit
9e14fcd259
3 changed files with 0 additions and 19 deletions
|
|
@ -622,8 +622,6 @@ dns_cache_dumpstats(dns_cache_t *cache, FILE *fp) {
|
|||
"cache database nodes");
|
||||
fprintf(fp, "%20u %s\n", dns_db_nodecount(cache->db, dns_dbtree_nsec),
|
||||
"cache NSEC auxiliary database nodes");
|
||||
fprintf(fp, "%20" PRIu64 " %s\n", (uint64_t)dns_db_hashsize(cache->db),
|
||||
"cache database hash buckets");
|
||||
|
||||
fprintf(fp, "%20" PRIu64 " %s\n", (uint64_t)isc_mem_inuse(cache->tmctx),
|
||||
"cache tree memory in use");
|
||||
|
|
@ -683,7 +681,6 @@ dns_cache_renderxml(dns_cache_t *cache, void *writer0) {
|
|||
dns_db_nodecount(cache->db, dns_dbtree_main), writer));
|
||||
TRY0(renderstat("CacheNSECNodes",
|
||||
dns_db_nodecount(cache->db, dns_dbtree_nsec), writer));
|
||||
TRY0(renderstat("CacheBuckets", dns_db_hashsize(cache->db), writer));
|
||||
|
||||
TRY0(renderstat("TreeMemInUse", isc_mem_inuse(cache->tmctx), writer));
|
||||
|
||||
|
|
@ -753,10 +750,6 @@ dns_cache_renderjson(dns_cache_t *cache, void *cstats0) {
|
|||
CHECKMEM(obj);
|
||||
json_object_object_add(cstats, "CacheNSECNodes", obj);
|
||||
|
||||
obj = json_object_new_int64(dns_db_hashsize(cache->db));
|
||||
CHECKMEM(obj);
|
||||
json_object_object_add(cstats, "CacheBuckets", obj);
|
||||
|
||||
obj = json_object_new_int64(isc_mem_inuse(cache->tmctx));
|
||||
CHECKMEM(obj);
|
||||
json_object_object_add(cstats, "TreeMemInUse", obj);
|
||||
|
|
|
|||
11
lib/dns/db.c
11
lib/dns/db.c
|
|
@ -800,17 +800,6 @@ dns_db_nodecount(dns_db_t *db, dns_dbtree_t tree) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
size_t
|
||||
dns_db_hashsize(dns_db_t *db) {
|
||||
REQUIRE(DNS_DB_VALID(db));
|
||||
|
||||
if (db->methods->hashsize == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (db->methods->hashsize)(db);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_db_register(const char *name, dns_dbcreatefunc_t create, void *driverarg,
|
||||
isc_mem_t *mctx, dns_dbimplementation_t **dbimp) {
|
||||
|
|
|
|||
|
|
@ -173,7 +173,6 @@ typedef struct dns_db_methods {
|
|||
dns_rdataset_t *rdataset,
|
||||
dns_rdataset_t *sigrdataset DNS__DB_FLARG);
|
||||
isc_result_t (*setcachestats)(dns_db_t *db, isc_stats_t *stats);
|
||||
size_t (*hashsize)(dns_db_t *db);
|
||||
isc_result_t (*getsize)(dns_db_t *db, dns_dbversion_t *version,
|
||||
uint64_t *records, uint64_t *bytes);
|
||||
isc_result_t (*setservestalettl)(dns_db_t *db, dns_ttl_t ttl);
|
||||
|
|
|
|||
Loading…
Reference in a new issue