directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] Created: (DIRSERVER-1266) The new referal handling generate 2 lookup instead of one for every search request
Date Fri, 19 Sep 2008 10:04:44 GMT
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.


Mime
View raw message