[Date Prev][Date Next]
(ITS#4519) better back-meta handling of setup of operations that affect multiple targets
Full_Name: Pierangelo Masarati
Submission from: (NULL) (188.8.131.52)
Submitted by: ando
This message should pass thru -devel, I guess, but since the solution should be
clear and straightforward I place it in an ITS to better track it.
Basically, all operations except search only affect one target; another
potential exception is rename, but when it affects two targets it poses another
order of problems, so it'd need special treatment anyway.
So this probem only surface s during search and may justify special handling.
When running a search that affects multiple targets, all sub-searches are
started asynchronously; results are returned as soon as they come in, looping on
all active sub-searches. However, there is a bottleneck: if the search is the
first operation on an active connection (at least, for those targets which are
first used for that connection), all connection creation and bind have to be
completed before the search starts.
We had reports of etherogeneous pools of targets where a slow one would defer
the beginning of results return in an unacceptable manner. The solution would
be to explode meta_back_dobind() and loop on all active targets so that for
those that are already initialized the search is started; for the others, the
initialization is started, i.e. ldap_sasl_bind() is called instead of
ldap_search_ext(); then, the response loop will take care of handling search
responses or the bind response; in the latter case, the search will be
The overall result is that "quick" targets will start returning results
immediately, while slow ones will follow.
As a side effect, all the hairy code that handles dobind'ing when multiple
targets are allowed should no longer be required.