Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-1916

Don't drop 'top' from ObjectClass index, it's never present in the BTree

Attach filesAttach ScreenshotWatch issueCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0-M15
    • 2.0.0.AM26
    • backend
    • None

    Description

      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 :

                  // Update the ObjectClass index
                  for ( Value<?> value : objectClass )
                  {
                      objectClassIdx.drop( value.getString(), id );
                  }
      

      This is the same thing for modifyAdd() :

                  for ( Value<?> value : mods )
                  {
                      objectClassIdx.add( ( String ) value.getNormValue(), id );
                  }
      

      and modifyReplace() :

                  for ( Value<?> value : entry.get( OBJECT_CLASS_AT ) )
                  {
                      objectClassIdx.drop( ( String ) value.getNormValue(), id );
                  }
      

      for modifyRemove() :

                      for ( Value<?> objectClass : entry.get( OBJECT_CLASS_AT ) )
                      {
                          objectClassIdx.drop( ( String ) objectClass.getNormValue(), id );
                      }
      

      and

                      for ( Value<?> value : mods )
                      {
                          objectClassIdx.drop( ( String ) value.getNormValue(), id );
                      }
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            elecharny Emmanuel L├ęcharny
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment