From dev-return-39091-apmail-directory-dev-archive=directory.apache.org@directory.apache.org Thu Sep 8 12:50:42 2011 Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 98F5E7480 for ; Thu, 8 Sep 2011 12:50:42 +0000 (UTC) Received: (qmail 40244 invoked by uid 500); 8 Sep 2011 12:50:42 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 39373 invoked by uid 500); 8 Sep 2011 12:50:36 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 39277 invoked by uid 99); 8 Sep 2011 12:50:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Sep 2011 12:50:35 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Sep 2011 12:50:29 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DC82C88AC3 for ; Thu, 8 Sep 2011 12:50:08 +0000 (UTC) Date: Thu, 8 Sep 2011 12:50:08 +0000 (UTC) From: "Selcuk Aya (JIRA)" To: dev@directory.apache.org Message-ID: <747558955.2805.1315486208899.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <861881639.2609.1315479549448.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Issue Comment Edited] (DIRSERVER-1655) Possible incorrect insertion of modifications in the consumer log MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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