From c429b52533e4e454905fb1507ddee8f87472e152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 3 Nov 2022 09:06:08 +0100 Subject: [PATCH] Don't cleanup the dead nodes when pruning the tree The dead nodes might get reactivated during the db iterator walks the version of the tree, so we can't cleanup the dead nodes while the db version is open. Restore the previous behaviour that cleaned up the dead nodes when we are closing the version. --- lib/dns/rbtdb.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index abe0296914..f446b822e9 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -2254,12 +2254,6 @@ prune_tree(isc_task_t *task, isc_event_t *event) { decrement_reference(rbtdb, node, 0, &nlocktype, &tlocktype, true); - /* - * We have both write locks, we might as well do a light - * dead nodes cleaning. - */ - cleanup_dead_nodes(rbtdb, locknum); - if (parent != NULL && parent->down == NULL) { /* * node was the only down child of the parent and has