Skip to content

Use cds_lfht for updatenotify mechanism in dns_db unit

Ondřej Surý requested to merge 4196-use-rculist-for-dns_db_updatenotify into main

The updatenotify mechanism in dns_db relied on unlocked ISC_LIST for adding and removing the "listeners". The mechanism relied on the exclusive mode - it should have been updated only during reconfiguration of the server. This turned not to be true anymore in the dns_catz - the updatenotify list could have been updated during offloaded work as the offloaded threads are not subject to the exclusive mode.

Change the update_listeners to be cds_lfht (lock-free hash-table), and slightly refactor how register and unregister the callbacks - the calls are now idempotent (the register call already was and the return value of the unregister function was mostly ignored by the callers).

Closes #4196 (closed)

Merge request reports