directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <>
Subject [jira] Created: (DIRSERVER-1578) The index values must have been normalized before being used
Date Sun, 31 Oct 2010 15:14:26 GMT
The index values must have been normalized before being used

                 Key: DIRSERVER-1578
             Project: Directory ApacheDS
          Issue Type: Improvement
    Affects Versions: 1.5.7
            Reporter: Emmanuel Lecharny

Each time we access an index using a value, we do a normalization of this value. This is potentially
an costly operation, which is mostly a duplicated work. In order to spare such an operation,
a cache is added to the index, but it has two drawbacks :
- first the cache is small (default size is 100, just enough to store 50 values at most, as
we register both the normal value and the normalized value)
- second, this cache is synchronized to avoid inconsistencies, so it induce some contention

We should assume that the value is *always* normalized when we use such an index, and remove
this extra normalization, and the associated cache.

Note that we may use a Attribute value, or a Long (for the reverse index), so it would be
quite a good idea to create two different type of indexes :
- AttributeType index
- ID indexes

instead of using generic indexes all the time. 

Last, in order to be sure that we use normalized values, it's enough to add a flag in the
Value<?> class to tell if the value is normalized or not. If it's not, we just have
to normalize it.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message