Summary: | Coherence cache issue with CollectionAnnotator's WeakHashMap | ||
---|---|---|---|
Product: | [Modeling] Epsilon | Reporter: | Sébastien Latre <sebastien.latre> |
Component: | Core | Assignee: | Dimitris Kolovos <dkolovos> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | blocker | ||
Priority: | P3 | CC: | sebastien.latre |
Version: | unspecified | Keywords: | consistency |
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Sébastien Latre
2013-03-28 05:38:16 EDT
Many thanks for reporting this. I've investigated a bit and the only clean solution I can see is to get rid of CollectionAnnotator altogether. It is currently only used to annotate EMF ELists but it should be possible to figure out uniqueness/ordering by checking to see if the list in question is an EcoreEList and then using its getEStructuralFeature() method to get access to the underlying structural feature. This will require an additional extension point for collection type resolvers (the core of Epsilon is decoupled from EMF) so this may take a couple of weeks to fix and test. I believe I've now fixed this in the SVN (r2167). Could you please check and let me know whether it works for you? I couldn't use the complete new version from the trunk as I have some other constraints but I merged your fix inside my version and so far I have not been able to reproduce the problem after several tries. Your fix looks awesome and really simple. Fortunately you corrected it because I wouldn't have done this way (quite hard to understand at once the Epsilon split between engine and EMF...) However, does the remove of the cache not harmful for the overall performances? With your fix it's quite easy to add a WeakHashMap agan inside EmfCollectionTypeResolver as we can build the the type again from the collection itself. That's just a question in fact. Anyway, thanks very much for your reactivity! Many thanks for your feedback. Caching previously computed collection types sounds like a very good idea indeed. I've implemented this at the level of EolCollectionType in R2185. Fixed in the latest interim version (1.0.0.201304211529). Fixed in 1.1 |