directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <seelm...@apache.org>
Subject Re: Is this intended, or should we consider that is a bug ?
Date Wed, 15 Jun 2011 12:07:52 GMT
On Wed, Jun 15, 2011 at 1:53 PM, Emmanuel Lecharny <elecharny@gmail.com> wrote:
> Hi,
>
> I'm wondering if the following code snippet is just a bug, or if this was
> intended :
>
>    public PresenceEvaluator( PresenceNode node, Store<Entry, ID> db,
> SchemaManager schemaManager )
>        throws Exception
>    {
>        this.db = db;
>        this.node = node;
>        this.schemaManager = schemaManager;
>        this.attributeType = node.getAttributeType();
>
>        if ( db.hasUserIndexOn( attributeType ) )
>        {
>            idx = db.getPresenceIndex();
>        }
>        else
>        {
>            idx = null;
>        }
>    }
>
> In my case, the AttributeType is ObjectClass, which is a System index. I
> find it extremely doubtful that we want to set idx to null in this very
> case.

AFAIK we only add user attributes to the precence index. System
attributes (objectClass, entryUUID, entryCSN) are not added to the
precense index because they are always present in an entry so it would
be a waste of space to add them to the presence index. Instead in
another part of the PresenceEvaluator we check if the index is a
system index and return true.

However I see that this is confusing because the logic is splitted
between different classes (Store, PresenceEvaluator, PrecenseCursor).

HTH,
Stefan

Mime
View raw message