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

Bug 315407

Summary: Stale references can occur if one of two commits deletes a reference target
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: cyril.jaquier, erwin
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Patch v1
none
Testcase stepper: iplog+

Description Eike Stepper CLA 2010-06-02 10:53:45 EDT
Commit 1 adds a reference to object X.
Commit 2 detaches X.

Both can happen at the same time when the commits arrive at the server, so no client logic can detect and prevent this scenario.
Comment 1 Eike Stepper CLA 2010-06-02 11:02:41 EDT
Created attachment 170811 [details]
Patch v1
Comment 2 Eike Stepper CLA 2010-06-13 05:18:26 EDT
Committed to HEAD
Comment 3 Eike Stepper CLA 2010-06-19 02:04:29 EDT
The boolean configuration property of the server to control this behaviour is IRepository.Props.ENSURE_REFERENTIAL_INTEGRITY = "ensureReferentialIntegrity". The same property is used to control the behaviour of bug 316434.
Comment 4 Eike Stepper CLA 2010-06-29 04:35:55 EDT
Available in 3.0 GA:
http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/
Comment 5 Erwin Betschart CLA 2010-07-22 08:42:12 EDT
Created attachment 174963 [details]
Testcase

Testcase which shows that it is possible to lock detached target objects.

I confirm to
1) The number of lines that you changed is smaller than 250.
2) You are the only author of these changed lines.
3) You apply the EPL to these changed lines.
Comment 6 Erwin Betschart CLA 2010-07-22 08:42:27 EDT
Please reopen.
Comment 7 Eike Stepper CLA 2010-07-22 11:17:01 EDT
Reopening for investigation...
Comment 8 Eike Stepper CLA 2010-07-22 11:19:00 EDT
This is a 3.0 bug, can you please open a new one?
Comment 9 Erwin Betschart CLA 2010-07-23 02:29:10 EDT
Opened bug 320690
Comment 10 Eike Stepper CLA 2011-06-23 04:27:49 EDT
Moving all open problem reports to 4.0
Comment 11 Eike Stepper CLA 2012-09-21 06:51:00 EDT
Closing.