Add an extended operation to re-index an attribute
--------------------------------------------------

                 Key: DIRSERVER-1477
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1477
             Project: Directory ApacheDS
          Issue Type: New Feature
            Reporter: Emmanuel Lecharny
             Fix For: 2.0.0-RC1


We need a way to re-index an attribute live. The best solution would be to add 
an extended operation to do so.

The problem we will have with this approach is that we should deal with the 
ongoing operations : search, add, delete, etc... while the index is being 
rebuilt.

One solution would be to :
- block any update during the index construction
- keep directing pending search operations on the previous table until the 
index is built
- new search will also be using the previous index until the index is built
- when the index is built, then we should redirect all the operation to the new 
index
- when we don't have anymore operations using the old index, then we can ditch 
it
- one special case is the persistent search operation. We should redirect it to 
use the new index when it has been rebuilt
- last, not least, the new update operations (those which has been sent after 
the ExtendedOperation has been received) should be hold in a queue until the 
index is built.

I don't think it should be a big deal to implement such a system, but we can 
restrain it to newly added index (reindexing  should be just used when the 
index is broken, and it's more or less an admin task).

Not sure either it makes sense to add an operation to remove an index, but why 
not.

We should also have a specific parameter if we want to modify the index cache 
size.

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