]> git.ipfire.org Git - thirdparty/bind9.git/commit
Support for off-loop read-ony qp-trie transactions
authorTony Finch <fanf@isc.org>
Thu, 2 Mar 2023 13:30:24 +0000 (13:30 +0000)
committerTony Finch <fanf@isc.org>
Wed, 5 Apr 2023 11:35:04 +0000 (12:35 +0100)
commit44c80c4ae1585f9237cdcf7fe0571e3bd3fd9ca3
treeac47599de4b0bea1d765256e9e883f4a35f0b96e
parentfa1b57ee6e703bf39d1ebab1b6d99e0fa4bfb32b
Support for off-loop read-ony qp-trie transactions

It is sometimes necessary to access a qp-trie outside an isc_loop,
such as in tests or an isc_work callback. The best option was to use
a `dns_qpmulti_write()` transaction, but that has overheads that are
not necessary for read-only access, such as committing a new version
of the trie even when nothing changed.

So this commit adds a `dns_qpmulti_read()` transaction, which is
nearly as lightweight as a query transaction, but it takes the mutex
like a write transaction.
lib/dns/include/dns/qp.h
lib/dns/qp.c