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 14:50:08 UTC

[jira] [Issue Comment Edited] (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=13100268#comment-13100268 ] 

Selcuk Aya edited comment on DIRSERVER-1655 at 9/8/11 12:48 PM:
----------------------------------------------------------------

CSN are consecutive and journal keeps the entries in sorted but the log entries are not inserted in sorted order.

I would still go with something like this:

////////////////////////////////
or maye do CSN creation under a lock and notify all consumer logs under this lock
///////////////////////
notify replication even interceptor OF CSN creation ->get log locks
generat csn,
insert  an entry with key CSN and value null
notify replication even interceptor OF CSN creation->release log locs




do modification

notify replication event interceptor of modifaction
update the entry with key csn with the real log entry

When consumer log thread reads off this log in increasing CSN order, it will wait for a null entry to be non null.


      was (Author: saya):
    CSN are consecutive and journal keeps the entries in sorted but the log entries are not inserted in sorted order.

I would still go with something like this:

notify replication even interceptor OF CSN creation ->get log locks
generat csn,
insert  an entry with key CSN and value null
notify replication even interceptor OF CSN creation->release log locs

do modification

notify replication event interceptor of modifaction
update the entry with key csn with the real log entry

When consumer log thread reads off this log in increasing CSN order, it will wait for a null entry to be non null.

  
> 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