This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 359695 - Annotations Refactoring
Summary: Annotations Refactoring
Status: RESOLVED FIXED
Alias: None
Product: Tigerstripe (Archived)
Classification: Technology
Component: Annotations (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.5M0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-03 08:06 EDT by Valentin Yerastov CLA
Modified: 2011-10-21 00:16 EDT (History)
2 users (show)

See Also:


Attachments
Annotations Refactoring Patch (334.20 KB, patch)
2011-10-03 08:06 EDT, Valentin Yerastov CLA
no flags Details | Diff
Annotations Refactoring Patch 2 (352.16 KB, patch)
2011-10-04 14:39 EDT, Valentin Yerastov CLA
no flags Details | Diff
Deadlock after running a simple generator (23.73 KB, text/rtf)
2011-10-05 11:58 EDT, Navid Mehregani CLA
no flags Details
Annotations Refactoring Patch 3 (385.23 KB, patch)
2011-10-05 17:15 EDT, Valentin Yerastov CLA
no flags Details | Diff
Patch 3 : Annotation resource processor fix (2.45 KB, text/plain)
2011-10-07 09:53 EDT, Anton Salnik CLA
no flags Details
Annotations Refactoring Patch 4 (396.31 KB, text/plain)
2011-10-13 00:30 EDT, Anton Salnik CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Yerastov CLA 2011-10-03 08:06:08 EDT
Created attachment 204442 [details]
Annotations Refactoring Patch

There are the bugs in the annotation framework:

- ConcurrentModificationException when modifying annotations 
- Annotations of artifacts are not removed then we remove a project.
- DeferredResourceSaver must use WorkspaceJob 
- Annotation is not always saved in file 
- Annotation sometimes is not saved into project, instead of it is saved in metadata 
- Deadlocks then we work with annotations 

More information accessible in the internal JIRA.

I've fixed these bugs and I attached the patch for code-review.
Comment 1 Valentin Yerastov CLA 2011-10-04 14:39:08 EDT
Created attachment 204542 [details]
Annotations Refactoring Patch 2

I removed some debug log message and made some improvements. Please use the latest patch.
Comment 2 Navid Mehregani CLA 2011-10-05 11:57:48 EDT
First code review was done on Oct 5 2011 10:00am EST:

Main changes:
  - EMFDatabase has been replaced by Storage, which now uses TransactionalEditingDomains
  - AnnotationManager has been heavily modified: Registers a new resource change listener.  Initializes Storage
  - Following plugins are no longer needed: espace.core, espace.resource, espace.resources.monitor

Suggested modifications:
  - New public APIs have been added with no comments
  - All classes should be commented
  - EObjectRouter has been changed to Router, but there may be existing routers that already use EObjectRouter
  - Annotation example needs to be restored

Issues with testing patch:
  - On certain projects, a progress bar is spun off for a really long time.  Label of progress bar is 'Saving annotation file'
  - I came across a deadlock after running a simple generator, which prints out the annotation files.  I'll attach the full stack trace.
Comment 3 Navid Mehregani CLA 2011-10-05 11:58:33 EDT
Created attachment 204608 [details]
Deadlock after running a simple generator

Pay particular attention to Daemon Thread [ModalContext]
Comment 4 Valentin Yerastov CLA 2011-10-05 17:15:19 EDT
Created attachment 204640 [details]
Annotations Refactoring Patch 3

I fixed the suggested issues. Thanks for threads dump.
Comment 5 Navid Mehregani CLA 2011-10-06 10:49:46 EDT
Valentin, even with your updated patch, I still get the long-running progress bar "Save Annotation File", which runs for a really long time after adding an annotation to our implementation model.
Comment 6 Anton Salnik CLA 2011-10-07 09:53:44 EDT
Created attachment 204751 [details]
Patch 3 : Annotation resource processor fix

Please use "Annotation resource processor fix" over patch 3 to prevent long running save operation.
Comment 7 Navid Mehregani CLA 2011-10-07 20:22:23 EDT
Anton, I'm still able to reproduce this problem.  I'll give more details in the internal JIRA on which project to use.
Comment 8 Anton Salnik CLA 2011-10-13 00:30:37 EDT
Created attachment 205079 [details]
Annotations Refactoring Patch 4

Performance issues fixed. New extension point "annotationFiles" added to configure annotation files filtering.
Comment 9 Navid Mehregani CLA 2011-10-14 16:26:15 EDT
There are cases where a build job is triggered right after adding an annotation, the progress bar stays at 0% and takes a really long time for it to go away.  I'll post more details in the JIRA.
Comment 10 Navid Mehregani CLA 2011-10-14 16:52:33 EDT
The issue noted in comment#9 only happens once.  It seems to be ok after that.  Please go ahead and submit this patch.  Thanks!
Comment 11 Anton Salnik CLA 2011-10-21 00:16:46 EDT
Annotations patch 4 applied.