[
https://issues.apache.org/jira/browse/SLING-11189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17503909#comment-17503909
]
Eric Norman commented on SLING-11189:
-------------------------------------
FYI: I created [PR
#13|https://github.com/apache/sling-org-apache-sling-jcr-contentloader/pull/13]
with an alternative solution for your consideration.
Basically, you declare with configuration a default set of file extensions that
are expected to have a registered ContentReader. Alternatively, the author can
declare what extensions are required for a specific PathEntry with a directive
in the manifest instruction if you prefer that. When processing the bundle,
if it does not find a ContentReader and we detect that we were expecting to
find one, then we throw an exception and the bundle goes into the
delayedBundles list to be retried later when a new ContentReader component
arrives.
I think this should be backward compatible and seems to preserve the
flexibility for any customization people may do.
I assume this should fix the original problem, but I was not ever able to
reproduce that problem locally to confirm.
> 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
> Fix For: JCR ContentLoader 2.5.2
>
> Time Spent: 3h
> Remaining Estimate: 0h
>
> 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)