Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 94504 invoked from network); 15 Oct 2010 14:44:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Oct 2010 14:44:02 -0000 Received: (qmail 3586 invoked by uid 500); 15 Oct 2010 14:44:01 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 3103 invoked by uid 500); 15 Oct 2010 14:43:58 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 2455 invoked by uid 99); 15 Oct 2010 14:43:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Oct 2010 14:43:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Oct 2010 14:43:57 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o9FEhaiM002608 for ; Fri, 15 Oct 2010 14:43:37 GMT Message-ID: <8364625.162721287153816940.JavaMail.jira@thor> Date: Fri, 15 Oct 2010 10:43:36 -0400 (EDT) From: "Thomas Mueller (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Resolved: (JCR-2786) Cluster sync not always done when calling session.refresh(..) In-Reply-To: <28764534.161871287151594617.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Mueller resolved JCR-2786. --------------------------------- Resolution: Fixed > Cluster sync not always done when calling session.refresh(..) > ------------------------------------------------------------- > > Key: JCR-2786 > URL: https://issues.apache.org/jira/browse/JCR-2786 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: clustering > Reporter: Thomas Mueller > Assignee: Thomas Mueller > > Session.refresh(..) is supposed to synchronize cluster changes, but this doesn't always happen, specially if the syncDelay is low. The reason is a wrong assumption in ClusterNode.sync: The code there to avoid duplicate sync calls doesn't always work as expected. The following algorithm is used: > int count = syncCount; > syncLock.acquire(); > if (count == syncCount) { > journalSync(); > syncCount++; > } > syncLock.release(); > The problem is that the background thread might be at the line "syncCount++" when Session.refresh(..) is called, so that the main thread believes journalSync was already called and thus doesn't call it. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.