You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2012/11/15 17:26:12 UTC
[jira] [Commented] (SLING-2668) EntityResourceList.compact() fails
to remove resource from list, causes infinite loop
[ https://issues.apache.org/jira/browse/SLING-2668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498106#comment-13498106 ]
Carsten Ziegeler commented on SLING-2668:
-----------------------------------------
I just checked the source, and there is also EntityResourceList#remove. We should:
- remove this method completely
- remove the remove method in PersistentResourceList
- and change the usage from this.persistentList.remove(rr); to this.persistentList.remove(rr.getURL());
in OsgiInstallerImpl#511
We didn't have problems with this method yet, however it exposes the same potential problem as compact(). Removing using the url is using a different approach
> EntityResourceList.compact() fails to remove resource from list, causes infinite loop
> -------------------------------------------------------------------------------------
>
> Key: SLING-2668
> URL: https://issues.apache.org/jira/browse/SLING-2668
> Project: Sling
> Issue Type: Bug
> Components: Installer
> Affects Versions: Installer Core 3.4.0
> Reporter: Bertrand Delacretaz
> Assignee: Bertrand Delacretaz
>
> EntityResourceList.compact() calls resources.remove(RegisteredResource) and that can fail in some cases, as the stored RegisteredResource might have changed since they were added to the SortedSet, which apparently trips the set's searching algorithm.
> This can cause an infinite loop in the installer, as cleanupInstallableResources() returning true triggers a new installer cycle.
> We should use a more robust method to remove resources, and check that they are actually removed.
--
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