[ 
https://issues.apache.org/jira/browse/DIRSERVER-1377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721174#action_12721174
 ] 

Emmanuel Lecharny commented on DIRSERVER-1377:
----------------------------------------------

This is not as easy as it seems. If we were to use some Java 5 concurrency 
object, I think it would be a ReadWriteLock. Now, the problem is that the index 
are used by the search operations, so we can't brutally synchronize the whole 
indexes while doing a write, as searches can last forever (for instance, when 
dealing with PersistentSearch, for replication).

We must provide a protection against concurrent acces by guaranteeing that the 
index are safe, not their content (ie, the elements contained in the index may 
have changed since the search has started, but the next() operation should 
always return something safe).

This is not simple...

> Potential concurrency issue when adding/modifying/deleting entries at a high 
> rate
> ---------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-1377
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1377
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Emmanuel Lecharny
>            Priority: Blocker
>             Fix For: 1.5.5
>
>
> When adding/deleting entries with many clients (a client add and delete an 
> entry many times), we may have some concurrency problem, as the index are 
> updated without concurrent acces protection.
> Synchronizing the classes where we update the index might help.

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