Skip to content

Review and refactor the isc_ratelimiter API

Ondřej Surý requested to merge ondrej/isc_ratelimiter-shutdown-cleanup into main

Couple things have been done to make the isc_ratelimiter API simpler

  1. Remove unused parts of the API - the stall and release mechanic was not used anywhere

  2. When stopping the isc_timer, purge the pending events that may have been posted meanwhile. By doing this, we can destroy the timer directly when shutting down the isc_ratelimiter rather on an event and also remove the reference counting from isc_ratelimiter, because the isc_timer will not use the reference to isc_ratelimiter.

  3. isc_ratelimiter_create() cannot fail now - cleanup the calls.

  4. Don't hold the reference to isc_task neither from isc_ratelimiter nor dns_zonemgr. The isc_timer will hold the reference to the isc_task and released when the isc_timer gets destroy.

  5. Add isc_magic to the isc_ratelimiter struct.

Merge request reports