| Summary: | Logical view is sometime unable to display newly imported project | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Bozier jerome <jerome.bozier> | ||||
| Component: | TPTP | Assignee: | Bozier jerome <jerome.bozier> | ||||
| Status: | CLOSED FIXED | QA Contact: | Kathy Chan <kathy> | ||||
| Severity: | normal | ||||||
| Priority: | P2 | CC: | jptoomey, paulslau | ||||
| Version: | unspecified | Flags: | paulslau:
review+
|
||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | adopter | ||||||
| Attachments: |
|
||||||
|
Description
Bozier jerome
to be a bit more precise to reproduce it . first, go in logical view . then, import a very big project (as testnavigator.tests) . expand it . while the proxy are calculated, import another project reason : . all is happening inside LogicalTestNavigator class, inside ProxiesRequests subclass . when you import a project, it is added to the map "projectToRequestMap" . the listener on "nodesChanged" iterate on this map keyset. so, if this map is changed during this time, the "concurrentAccess" exception is raised fix : . make a synchronize block on the map time to copy the keySet list. . make the "nodesChanged" iterate on this copy updating estimated time, patch will come in a few Created attachment 170534 [details]
patch
this patch protect the project map against multithread access :
. map is now a SynchronizedMap (protect it for all adding/removing)
. when we have to iterate on it (for refresh or dispose), we create a local copy in a small synchronized block and iterate on the copy
Paul, could you review it please ? many thanks in advance test case added under CVS (will update wiki if patch is pushed under CVS) Jerome, Is this a regression from previous releases or just a newly found problem? As you are aware, Paul is not available to review the patch at this time. Adding Joe to the CC list to review it. I'm tentatively targeting this to 4.7.1 unless this turns out to be a regression or a serious problem affecting many consumers. This seems to be a very fringe use case (importing a project while a previously imported project is still being expanded in the Logical test navigator.) I agree with the 4.7.1 target. seeing the source code, this bug exists since really long time (perhaps since logical view exists in test navigator) so, i agree on the 4.7.1 target (i made the patch because it was fast and to not forget it) updating worked hours Requires adding /org.eclipse.hyades.test.ui.navigator.tests/manual/Test.UI.TestNavigator_bugzilla_315078.testsuite to /org.eclipse.hyades.test.ui.navigator.tests/manual/AllTests.testsuite and http://wiki.eclipse.org/TPTP_Test_Tools_Project_Tests#Manual. Of interested but not formally requested by a consuming product. As such, a candidate defect for TPTP 4.7.0.1. The attached patch reviewed with comments: -Update the copyright year to 2010. -Do we still need to synchronize on projectToRequestMap if we are using a synchronized map? If it's required, we should use a separate locking object. (In reply to comment #10) > > -Do we still need to synchronize on projectToRequestMap if we are using a > synchronized map? If it's required, we should use a separate locking object. ya, synchronized map is automatically protected except for iterating part, that must be in synchronized block (synchronized on list itself, see : http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html#synchronizedMap%28java.util.Map%29) Patch fixed (for copyright) and pushed on CVS head test suite added to "allTest" wiki updated closing fix : update status to resolved insted of closed verified in build TPTP-4.7.1-201008232100, closing |