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

Alex Karasulu updated DIRSERVER-922:
------------------------------------

    Assignee: Pierre-Arnaud Marcelot  (was: Alex Karasulu)

When you want to add a new index to an already populated partition you need to 
build and populate that new index using the 'index' command with the 
apacheds-tools utility.  Adding an index just adds an empty index to the server 
which results in this problem you have observed.

I wrote the command code for apacheds-tools needed to do this in 1.0.  I was 
going to add this to the trunk for 1.5.x but I could not make heads or tails 
out of the funky patterns used to refactor this code.

Really Emmanuel and PAM it's not just enough to document the refactoring to 
justify it.  This stuff is way too complex for what we need it to do in terms 
of command plugability and reuse for a simple tool like this.  The patterns 
used should be clear enough to infer what you're doing without considerable 
documentation which is hard to find.  This is the point to writing self 
documenting code (not referring to internal documentation like javadocs) with 
clear names and comprehendable patterns.  This current practice is going to 
alienate authors from the code as it did to me and result in problems like this 
one. 

So I'm leaving it up to those who changed my design in 1.0 to do the work of 
porting the index command in 1.0 to 1.5.  Here's the IndexCommand 
implementation in the 1.0 branch:
   
http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java?view=log



> Data is "lost" after adding Index to config file
> ------------------------------------------------
>
>                 Key: DIRSERVER-922
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-922
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.0
>         Environment: amd64
> 128M RAM
> 768 Swap
> prebuilt i386 apacheds-1.5.0
>            Reporter: Martin Marcher
>            Assignee: Pierre-Arnaud Marcelot
>             Fix For: 1.5.1
>
>
> Install Server
> add sevenseas Partition without any indexes (no property tag for indexes here 
> at all)
> start server
> connect with LDAPStudio 0.8 (do not disconnect!)
> Load o=sevenSeas SampleData
> open server.xml Config file
> copy indexes from examplePartition to sevenSeasPartition
> don't yet save the file
> stop the server
> save server.xml
> start the server gain
> LDAPStudio will not show any data under o=sevenSeas.  (Note: Do not close the 
> connection and reconnect)
> When Trying to add the data again you will find that it is still there
> as importing again throws errors.
> This is is also the case when closing connection and reopening the connection
> as well as quitting ldapstudio and restarting it
> reloading "this entry and all it's children" didn't help
> reloading schema didn't help either.
> greets
> martin

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

Reply via email to