mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-14 22:53:34 -04:00
QP database node data is not reference counted the same way RBT nodes were: in the RBT, node->references could be zero if the node was in the tree but was not in use by any caller, whereas in the QP trie, the database itself uses reference counting of nodes internally. this caused some subtle errors. in RBTDB, when the newref() function is called and the node reference count was zero, the node lock reference counter would also be incremented. in the QP trie, this can never happen - because as long as the node is in the database its reference count cannot be zero - and so the node lock reference counter was never incremented. reference counting will probably need to be refactored in more detail later; the node lock reference count may not be needed at all. but for now, as a temporary measure, we add a third reference counter, 'erefs' (external references), to the dns_qpdata structure. this is counted separately from the main reference counter, and should match the node reference count as it would have been in RBTDB. this change revealed a number of places where the node reference counter was being incremented on behalf of a caller without newref() being called; those were cleaned up as well. This is an adaptation of commit 3dd686261d2c4bcd15a96ebfea10baffa277732b |
||
|---|---|---|
| .. | ||
| dns | ||
| isc | ||
| isccc | ||
| isccfg | ||
| ns | ||
| .gitignore | ||
| Makefile.am | ||