[ 
https://issues.apache.org/jira/browse/SLING-11189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17502774#comment-17502774
 ] 

Konrad Windszus commented on SLING-11189:
-----------------------------------------

I think at least waiting for the mandatory readers shipped with the same bundle 
(similar to what is done in 
https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/master/src/main/java/org/apache/sling/resourceresolver/impl/FactoryPreconditions.java)
 before activating the BundleContentLoaderListener would be reasonable. Not 
sure we can do it exclusively with DS or we need to rely on OSGi Services API 
for that. Maybe that would also be a fit for 
http://docs.osgi.org/specification/osgi.core/8.0.0/service.condition.html 
(which requires OSGi R8 though).

> Content Loader: Race condition registering readers vs. loading content
> ----------------------------------------------------------------------
>
>                 Key: SLING-11189
>                 URL: https://issues.apache.org/jira/browse/SLING-11189
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: JCR ContentLoader 2.5.0
>            Reporter: Stefan Seifert
>            Assignee: Stefan Seifert
>            Priority: Major
>
> in SLING-11168 we detected a specific problem with Composum in Sling Starter 
> 12, which only occured on Windows 10 environments (and even there not 
> consistently in every scenario).
> it seems that it may happen that Sling-Initial-Content is loaded from the 
> bundles when the ContentReader implementations are not yet registered on the 
> ContentReaderWhiteboard.
> when this happens, the content is loaded into the repository, but files like 
> *.json are not transformed to nodes and properties, but is stored as binary 
> json files in the repository.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to