Title: #453: Speed up by-ID lookups with the help of the Global Catalog
@pbrezina sorry for the delay, but I was working on other PR reviews but also on fixing
some issues these patches had caused in AD downstream tests (new tests are running at the
About moving the logic to a separate request..I'm not sure this can be done easily,
because you can mix domains that support the locator and those that don't in the
cr_domains list, which means that running the locator before the lookups themselves would
be a bit wasteful (consider id_provider=files and id_provider=ad, you don't want to
search the AD server for every files provider lookup).
The other option, which I in fact considered initially was to move the whole logic into
cache_req_search, but there you're searching only in the context of a single domain
(the one in the cache_req structure), but the locator needs to set negative cache of other
domains from the same forest/from the same main sssd domain based on results of the
So what can be done is to turn `cache_req_search_domains_locate` into a tevent request, at
least then `cache_req_search_locate_cache_done` and `cache_req_search_locate_dp_done`
would be moved into this new request. Maybe, if it's not too much of a hack, we could
even pass the cr_domain list into this new request so that it can even set the negative
cache inside it.
Would this look nicer to you?
See the full comment at https://github.com/SSSD/sssd/pull/453#issuecomment-348170332