Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327396

Summary: [WorkingSets] updating of working sets during workbench restore can cause loss of working sets
Product: [Eclipse Project] Platform Reporter: Steffen Pingel <steffen.pingel>
Component: UIAssignee: Prakash Rangaraj <prakash>
Status: VERIFIED FIXED QA Contact: Prakash Rangaraj <prakash>
Severity: major    
Priority: P3 CC: mik.kersten, prakash
Version: 3.6   
Target Milestone: 3.7 M6   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 327262, 440240    
Attachments:
Description Flags
fix
none
mylyn/context/zip none

Description Steffen Pingel CLA 2010-10-09 19:09:18 EDT
Bug 327262 has a detailed description of the problem. 

Basically, if WorkingSet.setElements() is invoked while WorkingSetManager.restoreState() is running a partial workingsets.xml file is written to disk only containing the state loaded up to that point. 

In case working sets are not modified during the workbench session, i.e. WorkingSetManager.saveState() is never invoked to write all of the loaded state, some working sets may not be persisted and are lost.
Comment 1 Steffen Pingel CLA 2010-10-09 19:23:49 EDT
Created attachment 180556 [details]
fix

The patch sets a flag to delay saving of working sets when a restore is in progress.

We made some changes in Mylyn to lower chances of this happening but it would be much appreciated if a fix was considered for 3.6.2. The change is fairly straight forward and loss of working sets can be perceived as a major bug.
Comment 2 Steffen Pingel CLA 2010-10-09 19:23:52 EDT
Created attachment 180557 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2011-01-04 14:29:48 EST
Has anyone had a chance to look at the patch?
Comment 4 Hitesh CLA 2011-01-06 00:40:01 EST
See Bug 326673.
Comment 5 Steffen Pingel CLA 2011-01-06 01:41:20 EST
I don't see how the bug 326673 is related. This bug described here is not a problem caused by concurrent access. Take a look at the stack trace on bug 327262, all invocations are on the same call stack.
Comment 6 Steffen Pingel CLA 2011-03-03 23:21:42 EST
Any input on this? This bug can cause loss of configuration data and the attached patch is trivial.
Comment 7 Prakash Rangaraj CLA 2011-03-04 00:50:07 EST
Let me look at this
Comment 8 Prakash Rangaraj CLA 2011-03-04 02:51:39 EST
Patch is good. Released to HEAD.
Comment 9 Prakash Rangaraj CLA 2011-03-08 11:06:57 EST
(In reply to comment #8)
> Patch is good. Released to HEAD.

  Marking as Fixed
Comment 10 Prakash Rangaraj CLA 2011-03-09 00:06:43 EST
Verified in I20110307-2110