You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Alexander Klimetschek (JIRA)" <ji...@apache.org> on 2012/05/23 19:17:40 UTC

[jira] [Updated] (SLING-2493) sling:vanityPaths: observation listener should be registered before initial scan to avoid missing changes

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

Alexander Klimetschek updated SLING-2493:
-----------------------------------------

    Affects Version/s:     (was: JCR Resource 2.1.0)
    
> sling:vanityPaths: observation listener should be registered before initial scan to avoid missing changes
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-2493
>                 URL: https://issues.apache.org/jira/browse/SLING-2493
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>            Reporter: Alexander Klimetschek
>            Priority: Minor
>         Attachments: SLING-2493.patch
>
>
> MapEntries [0] does first a scan in doInit() and then registers the event listener for sling:vanityPath nodes. Now if a observation event comes in between that, it gets lost - the old content was read in the initial scan and is cached.
> It looks like we had such a case while both bundle and content were updated "at the same time". Possibly the registerService() method could be blocked for a while if many other services are restarted in such a update scenario involving multiple bundles.
> I think the observation listener for such cases should always be registered *before* the initial scan.
> [0] http://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntries.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira