]> 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)
committerOndřej Surý <ondrej@isc.org>
Fri, 24 Feb 2023 16:06:18 +0000 (17:06 +0100)
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.

lib/dns/catz.c

index cb112363368d3ebf0af7730d40292cb9263dc301..b90fcd277c46f1c71e80168de4395fe2f7ac60d7 100644 (file)
@@ -2285,6 +2285,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;