Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-1266

The new referal handling generate 2 lookup instead of one for every search request

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Won't Fix
    • 1.5.4
    • 1.5.5
    • 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 ) )

      { 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            elecharny Emmanuel Lécharny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: