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

Rupert Westenthaler commented on STANBOL-1023:
----------------------------------------------

After some investigations this is caused by the Sling OSGI installer calling 
the ResourceTransformer and InstallTaskFactory services of the Stanbol 
SolrIndexInstaller before any ManagedSolrServer is registered as OSGI service. 
If this is the case the InstallTask marks the Resource as IGNORED. 

Keeping the INSTALL state until a ManagedSolrServer becomes available is not a 
solution as the Sling OSGI installer does immediately retry - causing the 
installation thread to go for 100% CPU time. So even that in a typical startup 
this state only lasts for < 1sec it is no solution.

Also changing the start-levels is not a solution as the ManagedSolrServer is 
registered asynchronously to the startup thread. Meaning that the correct order 
of initialization can not be assured by the start levels.

Because of this the registration of the SolrIndexInstaller services 
(ResourceTransformer and InstallTaskFactory) need to be delayed until a 
ManagedSoltServer is available. For that a ServiceTrackerCustomizer needs to be 
used get notified of those events. However this solution will depend on the 
Sling OSGI installer to call ResourceTransformer#transform(..) for not yet 
transformed resources if new ResourceTransformer services do become available - 
what needs to be tested.
                
> Entityhub ReferencedSites may not be initialised on startup
> -----------------------------------------------------------
>
>                 Key: STANBOL-1023
>                 URL: https://issues.apache.org/jira/browse/STANBOL-1023
>             Project: Stanbol
>          Issue Type: Bug
>          Components: Entityhub
>            Reporter: Rupert Westenthaler
>            Assignee: Rupert Westenthaler
>            Priority: Minor
>
> Steps to trigger this Issue
> ===================
> This issue is triggered by
> * copying the {name}.solrindex.zip to the datafiles folder and
> * copying the o.a.s.data.sites.{name} bundle to the fileinstall folder
> while the Stanbol server is NOT running. On the next startup those sites 
> might not be
> correctly initialized due to a timing issue during the startup process (needs 
> further investigation)
> How to validate that one is affected
> ===========================
> Users can validate if they are affected by this by checking the "OSGI
> Installer" tab of the Felix Webconsole
> (http://{host}/system/console/osgi-installer). At the bottom you
> should see something like:
>     bundleinstall:/{name}.solrindex.ref IGNORED
> If this line notes INSTALLED than you are not affected and the error
> is caused by something else.
> Workaround
> =========
> As Workaround users need to stop/start the "o.a.s.data.sites.{name}"
> bundle as this will restart the installation process of the site.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to