Move dns_zone_checkzonemd and dns_zone_verifydb to axfr_apply

This moves these zone content checks to an off loaded work thread
for AXFR rather than have them be processed in axfr_apply_done.
For IXFR dns_zone_checkzonemd and dns_zone_verifydb are already
being processed in an off loaded work thread (ixfr_apply ->
ixfr_apply_one -> ixfr_end_transaction).
This commit is contained in:
Mark Andrews
2025-03-10 13:45:06 +11:00
parent 16fb0aad59
commit 83af4fc90b
+15 -9
View File
@@ -372,6 +372,20 @@ axfr_apply(void *arg) {
}
}
if (xfr->diff_running) {
/* This is offloaded. */
result = dns_zone_checkzonemd(xfr->zone, xfr->db, xfr->ver);
if (result == DNS_R_BADZONE) {
goto failure;
}
if (result != ISC_R_SUCCESS &&
dns_zone_gettype(xfr->zone) == dns_zone_mirror)
{
CHECK(dns_zone_verifydb(xfr->zone, xfr->db, xfr->ver));
}
}
result = ISC_R_SUCCESS;
failure:
dns_diff_clear(&xfr->diff);
work->result = result;
@@ -392,15 +406,6 @@ axfr_apply_done(void *arg) {
if (result == ISC_R_SUCCESS) {
CHECK(dns_db_endload(xfr->db, &xfr->axfr));
result = dns_zone_checkzonemd(xfr->zone, xfr->db, xfr->ver);
if (result == DNS_R_BADZONE) {
goto failure;
}
if (result != ISC_R_SUCCESS &&
dns_zone_gettype(xfr->zone) == dns_zone_mirror)
{
CHECK(dns_zone_verifydb(xfr->zone, xfr->db, NULL));
}
CHECK(axfr_finalize(xfr));
} else {
(void)dns_db_endload(xfr->db, &xfr->axfr);
@@ -519,6 +524,7 @@ static isc_result_t
ixfr_end_transaction(dns_xfrin_t *xfr) {
isc_result_t result = ISC_R_SUCCESS;
/* This is offloaded. */
result = dns_zone_checkzonemd(xfr->zone, xfr->db, xfr->ver);
if (result == DNS_R_BADZONE) {
goto failure;