You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Selcuk Aya (JIRA)" <ji...@apache.org> on 2011/09/08 13:23:09 UTC

[jira] [Commented] (DIRSERVER-1655) Possible incorrect insertion of modifications in the consumer log

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

Selcuk Aya commented on DIRSERVER-1655:
---------------------------------------

Have thought about this issue a little bit more after discussing it. The gist of it is that we do not insert the updates to the consumer log in CSN order and this might cause updates to be skipped when sending them to consumer. Inserting the modification to the consumer log using the same thread is not enough to solve this problem because the CSN for a modification seems to be gotten without any synchronization with regard to insertion into the consumer log. So if two threads update two different entries at CSN 9 and CSN 10 for example, these two modifications can be inserted into the consumer log in any order. 

I think, for now, the solution would be to guarantee an execution order like this using a log lock:
 notify replicationeventlistener for the modification before the csn is gotten and modification is done -> replicationeventlistener gets a lock for the log
get CSN
do the modification
 notify replicationeventlistener after modification ->replication event listener inserts into the log and releases the log lock.

> Possible incorrect insertion of modifications in the consumer log
> -----------------------------------------------------------------
>
>                 Key: DIRSERVER-1655
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1655
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M2
>            Reporter: Emmanuel Lecharny
>            Priority: Critical
>             Fix For: 2.0.0-M4
>
>
> The way we process modifications in the EventInterceptor, creating a new thread, make it possible that the modifications may be inserted into a consumer log in the wrong order.
> A possoble solution could be to use the same thread to insert modifications in the log.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira