Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Won't Fix
-
1.5.4
-
None
-
None
Description
The new implementation for referrals generate a double lookup for search requests, and generally speaking, an initial lookup for every operation.
Here is the portion of code in the ReferralAwareRequest.handle() method :
...
if ( req.getControls().containsKey( ManageDsaITControl.CONTROL_OID ) )
else
{ handleWithReferrals( session, reqTargetDn, req ); }...
private void handleWithReferrals( LdapSession session, LdapDN reqTargetDn, T req )
...
if ( ! ( req instanceof AddRequest ) )
{
try
{
entry = session.getCoreSession().lookup( reqTargetDn );
...
then the specific handler is called, where a second lookup is done.
We should at least store the first lookup result into the context so that we eliminate the need for a seconf lookup, but even then, I don't think it's a good idea. It would rather be much more efficient to deal with referrals the way it was done before (with a specific interceptor) instead of managing it at the protocol handling layer.