From dev-return-28208-apmail-directory-dev-archive=directory.apache.org@directory.apache.org Tue Dec 02 22:47:06 2008 Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 19930 invoked from network); 2 Dec 2008 22:47:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Dec 2008 22:47:06 -0000 Received: (qmail 47828 invoked by uid 500); 2 Dec 2008 22:47:17 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 47743 invoked by uid 500); 2 Dec 2008 22:47:16 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 47706 invoked by uid 99); 2 Dec 2008 22:47:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Dec 2008 14:47:16 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Dec 2008 22:45:56 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 59B28234C2A0 for ; Tue, 2 Dec 2008 14:46:44 -0800 (PST) Message-ID: <1652497550.1228258004366.JavaMail.jira@brutus> Date: Tue, 2 Dec 2008 14:46:44 -0800 (PST) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Subject: [jira] Closed: (DIRSERVER-1266) The new referal handling generate 2 lookup instead of one for every search request In-Reply-To: <1556216784.1221818684377.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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.