Full_Name: Ondrej Kuznik
Submission from: (NULL) (220.127.116.11)
During reconfiguration, the load balancer might need to dispose of some
resources (connections, ...) as the new configuration invalidates their state.
Due to how pool pause is handled in libldap_r, tasks might still be queued in
there that reference those objects and need to be de-queued before we resume.
Most of the time, it is sufficient to record the cookie from pool_submit2 and
use pool_retract. At least in some phases of the load balancer implementation we
could have more than one task scheduled for the same object - with
reconfiguration being the rare case, optimising for it at the expense of the
common case does not feel right.
The linked patch is ready for review, it lets the caller examine the tasks with
a specified start_routine and have any of them retracted where appropriate.