2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

Merge branch '4232-rbtdb-performance-fix' into 'main'

use read lock in rdataset_getownercase()

Closes #4232

See merge request isc-projects/bind9!8169
This commit is contained in:
Evan Hunt 2023-08-04 09:12:45 +00:00
commit 9aa6cd74fa

View File

@ -1476,7 +1476,7 @@ rdataset_getownercase(const dns_rdataset_t *rdataset, dns_name_t *name) {
uint8_t mask = (1 << 7);
uint8_t bits = 0;
dns_db_locknode(header->db, header->node, isc_rwlocktype_write);
dns_db_locknode(header->db, header->node, isc_rwlocktype_read);
if (!CASESET(header)) {
goto unlock;
@ -1499,5 +1499,5 @@ rdataset_getownercase(const dns_rdataset_t *rdataset, dns_name_t *name) {
}
unlock:
dns_db_unlocknode(header->db, header->node, isc_rwlocktype_write);
dns_db_unlocknode(header->db, header->node, isc_rwlocktype_read);
}