directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <seelm...@apache.org>
Subject Re: ExceptionInterceptor and undue lookup
Date Thu, 06 Jan 2011 21:21:30 GMT
On Thu, Jan 6, 2011 at 6:35 PM, Emmanuel Lecharny <elecharny@gmail.com> wrote:
> Hi,
>
> following my previous mail, I have a bit more insight about the problem.
>
> When we do a search, we not only give a base DN, but also a filter and a
> scope. Now, there are a few possibilities :
> 1) We have entries under the base DN, accepted by the filter and the scope
> 2) We have entries under the base DN, but the filter and the scope discard
> all of them, thus returning no entries
> 3) The base DN is not a DN in the DIT, the filter and scope are not even
> used, thus generating a NO_SUCH_OBJECT result.
>
> The ExceptionInterceptor extra lookup is just checking the third case. We
> can't handle this case in the SearchHandler, because the candidate have
> potentially been ruled out by the filter and the scope, and we can't anymore
> make a distinction between case #2 and case #3.

Can't that be handled at other places?

The DefaultPartitionNexus.getPartition(DN) seems to handle the case
that no partition for the base DN exists and throws an
LdapNoSuchObjectException. (example: base DN is
ou=people,dc=example,dc=com but not partiton for dc=example,dc=com
exists)

In the other case, when an partition exists then the problem is in
DefaultSearchEngine.cursor() method. This method returns an
EmptyIndexCursor if the base doesn't exist, IMO that should throw the
exception.

Kind Regards,
Stefan

Mime
View raw message