]> git.ipfire.org Git - thirdparty/bind9.git/commit
chg: dev: Add a refcount to the vecheaders
authorAlessio Podda <alessio@isc.org>
Tue, 31 Mar 2026 15:17:43 +0000 (15:17 +0000)
committerAlessio Podda <alessio@isc.org>
Tue, 31 Mar 2026 15:17:43 +0000 (15:17 +0000)
commita743ff1e44a72f69a3b04ce1520b07c8ccd5ca70
tree8e2c121be5f179756376b6325db7390b1294465b
parentf6e9998c3c0d9bf9d33a91ff848af1b4c2ec6a00
parent9fe3809ccfa8179a617a6e48d613e1af0c2c9650
chg: dev: Add a refcount to the vecheaders

This MR changes the way the ownership of the vecheaders is tracked. Before this MR, the ownership of the vecheader was implicitely tracked through a mix of the refcount on the node owning the header, the external refcount of the same node and the version. This has some adverse consequences in terms of contention, such as that querying A and AAAA glue hits the same refcount.

This MR adds a refcount to the vecheader itself, allowing it to exist independently of the node it is contained in. On its own, this would create a cycle, where the node has a reference to the header, which has a reference to the heap, which in turn has a reference to the node.

To break this cycle, this MR also moves from an "intrusive" heap, to a more traditional one where pointers to the node and vecheader in the heap are stored in a hashmap.

Merge branch 'alessio/vecheader-refs' into 'main'

See merge request isc-projects/bind9!11397