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

Bug 331330

Summary: Validation cannot be used concurrently
Product: [Modeling] EMF Services Reporter: Tim Baumgartner <tim.baumgartner>
Component: ValidationAssignee: Dummy Inbox for EMF <emf.validation-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: pierre-charles.david
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Typical stack traces none

Description Tim Baumgartner CLA 2010-11-29 07:14:53 EST
Build Identifier: I20100608-0911

In principal, validation can easily be made parallel. Because of proxy objects, one has to call EcoreUtil.resolveAll().
However, doing so I got concurrent modification inside EMFT Validation:
The ModelValidationService singleton stores constraint proxies in a cache. When the first constraints are required, the proxies are replaced by the actual constraints. Since all AbstractCostraintProviders access the singleton, we have a problem. In subsequent validations, no exceptions are thrown because all proxies have been replaced.


Reproducible: Sometimes
Comment 1 Tim Baumgartner CLA 2010-11-29 07:19:01 EST
Created attachment 184030 [details]
Typical stack traces

I attached a file containing 3 stack traces with CME / AIOBE.
Comment 2 Pierre-Charles David CLA 2021-02-27 07:43:45 EST
EMF itself offers no guarantee on multi-thread access (https://wiki.eclipse.org/EMF/FAQ#Is_EMF_thread-safe.3F). Proxy resolution is only one of the aspects.