[ 
https://issues.apache.org/jira/browse/DIRSERVER-1916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emmanuel Lecharny updated DIRSERVER-1916:
-----------------------------------------
    Component/s: backend

> Don't drop 'top' from ObjectClass index, it's never present in the BTree
> ------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1916
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1916
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>          Components: backend
>    Affects Versions: 2.0.0-M15
>            Reporter: Emmanuel Lecharny
>            Priority: Major
>             Fix For: 2.0.0.AM26
>
>
> There is no need to call the partition specific code to drop the 'top' 
> ObjectClass, it's not managed by any index. The following code in 
> AbstractBTreePartition need to be changed :
> {code:java}
>             // Update the ObjectClass index
>             for ( Value<?> value : objectClass )
>             {
>                 objectClassIdx.drop( value.getString(), id );
>             }
> {code}
> This is the same thing for modifyAdd() :
> {code:java}
>             for ( Value<?> value : mods )
>             {
>                 objectClassIdx.add( ( String ) value.getNormValue(), id );
>             }
> {code}
> and modifyReplace() :
> {code:java}
>             for ( Value<?> value : entry.get( OBJECT_CLASS_AT ) )
>             {
>                 objectClassIdx.drop( ( String ) value.getNormValue(), id );
>             }
> {code}
> for modifyRemove() :
> {code:java}
>                 for ( Value<?> objectClass : entry.get( OBJECT_CLASS_AT ) )
>                 {
>                     objectClassIdx.drop( ( String ) 
> objectClass.getNormValue(), id );
>                 }
> {code}
> and
> {code:java}
>                 for ( Value<?> value : mods )
>                 {
>                     objectClassIdx.drop( ( String ) value.getNormValue(), id 
> );
>                 }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to