Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 183683 - [api] Guard against externalization failure
Summary: [api] Guard against externalization failure
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 enhancement (vote)
Target Milestone: 3.0   Edit
Assignee: Robert Elves CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 194367 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-23 19:38 EDT by Robert Elves CLA
Modified: 2008-05-22 19:19 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Elves CLA 2007-04-23 19:38:37 EDT
If errors occur during externalization the task list can break. Also need some means of ensuring an incompatible externalizer doesn't read task nodes and these orphans make their way back into the output tasklist xml.
Comment 1 Mik Kersten CLA 2007-06-21 17:19:36 EDT
Safety should be improved with the new architecture.  In 3.0 let's review how we could be more defensive and handle orphans better.
Comment 2 Robert Elves CLA 2008-04-05 19:49:09 EDT
*** Bug 194367 has been marked as a duplicate of this bug. ***
Comment 3 Robert Elves CLA 2008-05-20 14:07:41 EDT
Done. We have two mechanisms to 0guard against externalization failure and ensure recovery:

  1) Copy, then write is performed when saving the primary data files. In event of a failure to read, the previous copy is restored and used.
  
  2) A complete snapshot of primary data files is taken every half hour and placed in the .mylyn/backup folder. One backup is maintained per hour for the last 8 hours. One backup is retained for the last 12 days. Older backups are removed.
  
Further improvements including validation of backups is being tracked on bug#233026.
Comment 4 Mik Kersten CLA 2008-05-21 02:46:15 EDT
Very cool.  Btw, why don't we keep the task repositories and task list in the same file?  They are quite tightly coupled.  They could either be part of the same XML document, or both part of the same zip file.
Comment 5 Steffen Pingel CLA 2008-05-21 03:17:18 EDT
-1 While the task list is coupled to repositories this is not a bi-directional coupling. There could be (headless) use cases for persisting repositories without using the task list.
Comment 6 Robert Elves CLA 2008-05-21 12:50:45 EDT
 (In reply to comment #4)
> Very cool.  Btw, why don't we keep the task repositories and task list in the
> same file?  They are quite tightly coupled.  They could either be part of the
> same XML document, or both part of the same zip file.
We could place them in the same zip but this would complicate the current externalization story.  Once we're dealing strictly with streams and the sink is determined by the ExternalizationManager rather than the participants, this could be feasible.
Comment 7 Mik Kersten CLA 2008-05-22 19:19:44 EDT
Agreed.