You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2011/09/23 16:34:26 UTC

[jira] [Updated] (JCR-2786) Cluster sync not always done when calling session.refresh(..)

     [ https://issues.apache.org/jira/browse/JCR-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-2786:
-------------------------------

    Fix Version/s: 2.2.0

> 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
>             Fix For: 2.2.0
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira