]> git.ipfire.org Git - thirdparty/pdns.git/commit
rec: be more memory efficient handling RPZ reloads 13462/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 8 Nov 2023 10:05:49 +0000 (11:05 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 8 Nov 2023 10:47:20 +0000 (11:47 +0100)
commit60d691fbc6520f1f818ea523b1636e305043e366
treeedcf16447992196687e63fef121fcc0d6476024f
parentb423006c76b96dd8cb1dbbe95b602e25959744c8
rec: be more memory efficient handling RPZ reloads

There were two things non-optimal:

- The old zone contents is being kept in memory during a sleep for the
next iteration and then thrown away. Fix: throw away before the sleep.

- The Lua config is kept alive. This causes refs to old config
data to stay around until all RPZ threads have cleared that config.
Fix that by making the config loop-local and load it after the sleep
call.

Above claims confirmed by adding some debug code showing the ref counts
for a config with many RPZs.
pdns/recursordist/rpzloader.cc