]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Pause the catz dbiterator while processing the zone
authorOndřej Surý <ondrej@isc.org>
Thu, 23 Feb 2023 10:10:39 +0000 (11:10 +0100)
committerArаm Sаrgsyаn <aram@isc.org>
Tue, 28 Feb 2023 11:11:17 +0000 (11:11 +0000)
The dbiterator read-locks the whole zone and it stayed locked during
whole processing time when catz is being read.  Pause the iterator, so
the updates to catz zone are not being blocked while processing the catz
update.

(cherry picked from commit 4e7187601f88a15c61282db862f5025703a7a78a)

lib/dns/catz.c

index 51cd251292a87e765f6ed1d91301257563ee6610..4867a56dfce3bdaa9225782002acb394cf907465 100644 (file)
@@ -2306,6 +2306,9 @@ dns__catz_update_cb(void *data) {
                        break;
                }
 
+               result = dns_dbiterator_pause(it);
+               RUNTIME_CHECK(result == ISC_R_SUCCESS);
+
                if (!is_vers_processed) {
                        /* Keep the version node to skip it later in the loop */
                        vers_node = node;