Community
Participate
Working Groups
UpdateSite has a static field that holds onto all instances of UpdateSite ever loaded. These instances should be flushed when no longer needed. When profiling I found this retained about 5MB of heap space in my self-hosting workspace which has several repositories available.
From bug 274681: Another consequence of this caching is that when the site changes, the cache is not updated until the next session.
*** Bug 274681 has been marked as a duplicate of this bug. ***
I see two options: 1. Don't cache file:/ URIs 2. If it is a file:/ URI we can check the timestamp and clear the cache that way. I am going to mark this RC1 as it would be good to get a fix in.
This issue existed in 3.4 and the problem is in figuring out the proper lifecycle.
*** Bug 287172 has been marked as a duplicate of this bug. ***
I have noticed a few bugs that are probably a result of this one. I think people are: 1. creating an update site 2. generating a p2 repo from this (cool it works) 3. making some changes to the site.xml 4. generating again 5. Finding out that things are missing from their newly generated repo. Since we cache the site.xml and step #2, we are actually ignoring their changes. This inevitably leads to a bug report that we can't reproduce because we just try their final site.xml and it works for us.
*** Bug 262630 has been marked as a duplicate of this bug. ***
Bug 309624 made changes to the caches to not cache local file: URIs and also to use SoftReferences. This makes the situation better, but we can still have outdated http: cached sites if the gc never felt it necessary to clear the references and the remote site changed.