You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Martin Marcher (JIRA)" <ji...@apache.org> on 2007/05/09 13:17:15 UTC

[jira] Created: (DIRSERVER-922) Data is "lost" after adding Index to config file

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


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.


[jira] Assigned: (DIRSERVER-922) Data is "lost" after adding Index to config file

Posted by "Alex Karasulu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Karasulu reassigned DIRSERVER-922:
---------------------------------------

    Assignee: Alex Karasulu

> 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: Alex Karasulu
>             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.


[jira] Commented: (DIRSERVER-922) Data is "lost" after adding Index to config file

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520821 ] 

Emmanuel Lecharny commented on DIRSERVER-922:
---------------------------------------------

Just some comments about your comments...

This is what I don't like about patterns : they fake to make thing easier by masking real code with 'funky names'. At the end, it's always the same story : double work :
- first you have to understand what is the real problem
- second you have to understand the pattern

ok, now for this command pattern this is really just a separation between client and server code, with a proxy in the middle. It is usefull when you don't want to deal with the underlying protocol. If you want to add a new command, or to modify an existing one, you just have to focus on the client and server code. I think pam has added some sample documentation on cwiki (remember than when you are using another pattern, you _also_ have to search the web or the GoF for a clear view of the way the pattern is used, so nothing new under the sun, and self-documented pattern is just a dream ...)





> 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.


[jira] Assigned: (DIRSERVER-922) Data is "lost" after adding Index to config file

Posted by "Kiran Ayyagari (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kiran Ayyagari reassigned DIRSERVER-922:
----------------------------------------

    Assignee: Kiran Ayyagari  (was: Pierre-Arnaud Marcelot)

> 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: Kiran Ayyagari
>             Fix For: 2.0.0-RC1
>
>
> 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.


[jira] Updated: (DIRSERVER-922) Data is "lost" after adding Index to config file

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-922:
----------------------------------------

    Fix Version/s: 1.5.1

This is a major issue. We need to get it fixed in 1.5.1 I think

> 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
>             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.


[jira] Updated: (DIRSERVER-922) Data is "lost" after adding Index to config file

Posted by "Alex Karasulu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Fix Version/s:     (was: 1.5.1)
                   1.5.2

Hey guys we can push this issue out to the next release.  I'd also like to simplify this code so it does just command line things clearly like the old code did it.  Then we can add this import command and just close this issue.

> 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.2
>
>
> 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.


[jira] Commented: (DIRSERVER-922) Data is "lost" after adding Index to config file

Posted by "Pierre-Arnaud Marcelot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521138 ] 

Pierre-Arnaud Marcelot commented on DIRSERVER-922:
--------------------------------------------------

As Emmanuel explained, it is a "simple" separation between client and sever code.

We added that to be able to launch a command even if the user is not logged in on the machine on which the server is installed. We wanted the command to be executed on the user's console then transfered to the server tools (on another machine) and the results to get back to the user's console.

But, since the current commands and the new one you're adding are only "local" commands, maybe it's better to use the 1.0 implementation for all the commands and keep the architecture we've set out in a sandbox (in case we need it someday).

I can also implement the command in the new way if you like.

I don't know what's the best solution...

> 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.


[jira] Closed: (DIRSERVER-922) Data is "lost" after adding Index to config file

Posted by "Kiran Ayyagari (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kiran Ayyagari closed DIRSERVER-922.
------------------------------------

    Resolution: Fixed

closing this issue as the related issue was already fixed.

> 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: Kiran Ayyagari
>             Fix For: 2.0.0-RC1
>
>
> 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.


[jira] Updated: (DIRSERVER-922) Data is "lost" after adding Index to config file

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-922:
----------------------------------------

    Fix Version/s: 2.0.0-RC1
                       (was: 2.0.0)

Moved back to 2.0.0-RC1

> 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: 2.0.0-RC1
>
>
> 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.


[jira] Updated: (DIRSERVER-922) Data is "lost" after adding Index to config file

Posted by "Alex Karasulu (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (DIRSERVER-922) Data is "lost" after adding Index to config file

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-922:
----------------------------------------

    Fix Version/s:     (was: 1.5.2)
                   2.0.0

This is still an existing issue, but I suggest we postpone it to 2.0, as we will have to write migration tools, which will contain index update which will be respectfull to existing data.

There is a workaround though :
- export data as LDIF
- modify the index
- drop the existing data
- stop the server
- start the server
- import the old data.

Should work (yeah, it's ugly ...)

> 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: 2.0.0
>
>
> 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.