[
https://issues.apache.org/jira/browse/SLING-3749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chetan Mehrotra updated SLING-3749:
-----------------------------------
Attachment: SLING-3749.patch
Initial proposal for the approach to be taken so as to get feedback. Would add
relevant test once we have agreement on the solution
For now it takes a simple approach and takes the lowest start level of bundle
to be updated.
*To be done*
This can be improved by also taking into account the startLevel of Bundles
which provide the task impls
*To be explored*
Another approach we can take is make use of
[FrameworkWiring.getDependencyClosure|http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/wiring/FrameworkWiring.html#getDependencyClosure%28java.util.Collection%29]
to get an estimate of what all bundles would be effected by bundles being
update. If the ratio is high then we should take the lowest startLevel
Any other heuristics if possible
[~cziegeler], [~fmeschbe] Thoughts?
> [OSGi Installer] Intelligently manage start level during artifact handling
> --------------------------------------------------------------------------
>
> Key: SLING-3749
> URL: https://issues.apache.org/jira/browse/SLING-3749
> Project: Sling
> Issue Type: Improvement
> Components: Installer
> Reporter: Chetan Mehrotra
> Attachments: SLING-3749.patch
>
>
> OSGi Installer should be made more intelligent in deciding how to handle
> bundle updates, if multiple bundles need to be updated e.g. by lowering the
> system start level when updating important bundles or when updating a large
> number of bundles to reduce oscillation of the system and thus reduce update
> time and increase stability.
> Some thoughts around this as per [~fmeschbe]:
> * Bundle installations are not problematic and don't need to be treated
> specially
> * Bundle updates and uninstallations may cause the system to oscillated
> because services may come and go during updates and package refreshes
> * Some bundles are more central than other bundles. For example the bundle
> providing the JCR Repository service is "used" by almost all of the system.
> And bundle may be important because a certain threshold if API importing
> bundles is reached (e.g. the Sling API bundle) or because one of the
> registered services is used by a certain threshold of consumers.
> * When at least one important bundle is updated or uninstalled in a single
> batch, the OSGi installer should reduce the system start level before
> handling the batch and raise the start level after the batch again.
> * The start level to which the system is reduced is the lower of the start
> level of the OSGi installer and its helper bundles (probably the Task
> provides) and the start levels of the important bundle(s) handled in the
> batch.
--
This message was sent by Atlassian JIRA
(v6.2#6252)