You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2010/01/20 22:39:54 UTC

[jira] Commented: (SLING-1305) SynchronousRefreshPackagesTask may miss PACKAGES_REFRESHED event

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

Marcel Reutegger commented on SLING-1305:
-----------------------------------------

I think there are two potential issues with the current implementation of execute():

- packageRefreshEventsCount is accessed by multiple threads. I think it should be declared volatile
- refreshPackages() is called before a listener is registered using addFrameworkListener()

I no longer see the warnings with the attached patch.

> SynchronousRefreshPackagesTask may miss PACKAGES_REFRESHED event
> ----------------------------------------------------------------
>
>                 Key: SLING-1305
>                 URL: https://issues.apache.org/jira/browse/SLING-1305
>             Project: Sling
>          Issue Type: Bug
>          Components: Installer
>            Reporter: Marcel Reutegger
>            Priority: Minor
>
> From time to time I see a timeout warning logged by the SynchronousRefreshPackagesTask in my system, triggered by a bundle update in the repository. In most cases the event is received within a reasonably time frame, but in some cases the event is not received and the time limit of 30 seconds is reached.
> When an update works fine, the log messages are something like (debug enabled for osgi installer):
> *DEBUG* [FelixDispatchQueue] org.apache.sling.osgi.installer FrameworkEvent.PACKAGES_REFRESHED
> *INFO* [FelixDispatchQueue] org.apache.felix.framework FrameworkEvent PACKAGES REFRESHED
> But when it doesn't, then there is only the info message.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.