Community
Participate
Working Groups
I20090224 The current gc trigger policy (GCActivator.registerGCTrigger), causes a gc to start if there is an uninstall event followed by a commit event. However, it is possible for two engine sessions to be occurring at concurrently, so it should check that the uninstall and the commit occurred against the same profile, since it is possible for multiple engine sessions to be running concurrently in different profiles. GCing at the wrong time can have fatal results on the profile (see bug 266881).
Note, ideally it should ensure that the uninstall and commit occurred in the same engine session, but the engine events don't currently expose enough information to implement that. Perhaps the event could carry a session id that allows us to check for that.
Created attachment 132107 [details] GCActivator patch I spoke with Simon yesterday and this is what we came up with. The patch should ensure that the GC is only called if a commit results in IUs being removed from a profile. Is there a good method to test GC behaviour?
Created attachment 132111 [details] GCActivator patch Added an additional check for null.
Created attachment 132112 [details] GCActivator patch Evidently Eclipse hadn't finished creating the patch!
Created attachment 132130 [details] GCActivator patch Missing manifest file
The patch is trying to do too much in that it should not try to detect if IUs have changed, etc. It should simply keep track of the profile ids (profile objects are too large to hold on to).
Created attachment 132793 [details] GCActiavtor patch I've tried to make the change smaller in this version. When an uninstall event occurs the profile's ID is stored, when a rollback or commit event occurs the event's profile is compared to the stored value and changes are only made if they match. If an uninstall event occurs when a profile id is already set only the newer value is kept. While there is no guarantee, its more likely that the older event will finish before the newer uninstall event so it seems preferable to GC after the uninstall commits.
The patch looks fine, but this is not crucial, so I would rather wait for another release rather than putting that in and risking late breakage.
Created attachment 164327 [details] Update the patch to match what is in HEAD
I have released a fix for this in HEAD.