2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

when committing a new qpzone version, delete dead nodes

if all data has been deleted from a node in the qpzone
database, delete the node too.
This commit is contained in:
Evan Hunt
2025-02-11 21:43:09 -08:00
parent 74c9ff384e
commit e58ce19cf2
2 changed files with 94 additions and 11 deletions

View File

@@ -202,10 +202,9 @@ struct qpcnode {
uint8_t : 0;
/*%
* Used for dead nodes cleaning. This linked list is used to mark nodes
* which have no data any longer, but we cannot unlink at that exact
* moment because we did not or could not obtain a write lock on the
* tree.
* Used for dead node cleaning. The deadnodes queue is used
* for nodes that have no data any longer, but we can't unlink
* yet because we don't have a tree lock.
*/
isc_queue_node_t deadlink;
};
@@ -216,9 +215,8 @@ struct qpcnode {
* to reduce contention between threads.
*/
typedef struct qpcache_bucket {
/*%
* Temporary storage for stale cache nodes and dynamically
* deleted nodes that await being cleaned up.
/*
* Temporary storage for cache nodes that need to be deleted.
*/
isc_queue_t deadnodes;