Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315407 - Stale references can occur if one of two commits deletes a reference target
Summary: Stale references can occur if one of two commits deletes a reference target
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 10:53 EDT by Eike Stepper CLA
Modified: 2012-09-21 06:51 EDT (History)
2 users (show)

See Also:


Attachments
Patch v1 (6.56 KB, patch)
2010-06-02 11:02 EDT, Eike Stepper CLA
no flags Details | Diff
Testcase (3.75 KB, patch)
2010-07-22 08:42 EDT, Erwin Betschart CLA
stepper: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.