[ 
https://issues.apache.org/jira/browse/DIRSERVER-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emmanuel Lecharny closed DIRSERVER-1266.
----------------------------------------


> The new referal handling generate 2 lookup instead of one for every search 
> request
> ----------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1266
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1266
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Emmanuel Lecharny
>            Priority: Blocker
>             Fix For: 1.5.5
>
>
> 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 ) )
>         {
>             handleIgnoringReferrals( session, reqTargetDn, null, req );
>         }
>         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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to