| Summary: | [Subsystems] Garbage collection of InstallArtifacts | ||
|---|---|---|---|
| Product: | [RT] Virgo | Reporter: | Glyn Normington <glyn.normington> |
| Component: | runtime | Assignee: | Glyn Normington <glyn.normington> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | ||
| Version: | 3.0.0.RELEASE | ||
| Target Milestone: | 3.5.0.M03 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 371427, 358441 | ||
|
Description
Glyn Normington
The other kind of dependency that can keep an artefact live is belonging to a plan (or subsystem). Targeting 4.0. The initial implementation of this feature should probably avoid garbage collecting transitive dependencies, i.e. bundles which are auto-installed because they are needed to resolve a graph of artifacts which is being deployed. GC of transitive dependencies will be needed for full subsystems support but Virgo does not uninstall transitive dependencies today, so the initial implementation should continue with that policy. Plans which share strict subgraphs of each other are the most straightforward case. For example, suppose two plans share a bundle. Then uninstalling one of the plans must not uninstall the shared bundle. However, if both plans are uninstalled, then the shared bundle must be uninstalled. A somewhat more difficult case is a plan which refers to a top-level deployed artefact. The demonstrates that we need to keep track of the roots independently of the DAG data structure. The reason for this is that if we allow an existing root to become a child a new install artefact graph, then we will have forgotten the "rootness" of the existing root and we will garbage collect it prematurely. A complex case which will need designing is where a bundle is part of an install artefact graph and also providing a transitive dependency of some (i.e. the same or another) install artefact graph. We really don't want to break a transitive dependency when uninstalling a graph containing such a bundle. So we probably need to track transitive dependencies in some way. If the transitive dependency was created before the install artefact graph was deployed, it is easy to determine that the bundle is providing a transitive dependency (we can record this when we auto-install the bundle). However, it is harder to keep track of transitive dependencies that are formed on existing bundles which are part of an install artefact graph. It therefore seems necessary to examine the package and bundle wiring as part of garbage collection as this is the true indication that a bundle is providing a transitive dependency. Garbage collection of the transitive dependencies of install artifacts is deferred to the larger effort to implement OSGi subsystems. This bug covers just the garbage collection of install artifacts and their descendants. |