Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316434 - Provide an option which prevents removal of still referenced objects (referential integrity)
Summary: Provide an option which prevents removal of still referenced objects (referen...
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard: Power to the People
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2010-06-10 05:29 EDT by Erwin Betschart CLA
Modified: 2011-06-23 03:40 EDT (History)
3 users (show)

See Also:


Attachments
Patch v1 (40.58 KB, patch)
2010-07-05 11:11 EDT, Eike Stepper CLA
no flags Details | Diff
Patch v2 (42.11 KB, patch)
2010-07-05 15:45 EDT, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erwin Betschart CLA 2010-06-10 05:29:51 EDT
Build Identifier: 3.0

CDO should provide an option which prevents (on the server) the removal of objects which are still referenced (incoming references).

Concurrent commits of two client can cause the local consistent model to become inconsistent on the server:
Object A references object B
Client 1: Add C which references B
Client 2: Delete A & B (commit should fail because B is still referenced by C)
(Assuming client did not yet receive the invalidation of the first commit)

Reproducible: Always
Comment 1 Caspar D. CLA 2010-06-10 06:31:00 EDT
Doesn't this duplicate bug 315407 and bug 316421 ?

The way I see it, we just don't have a server-side check
preventing removal of reference targets. IMO such a check
(as I suppose Eike has implemented in his patch for bug 315407)
would solve all 3 issues...

Or are there subtle differences that I'm not thinking of?
Comment 2 Eike Stepper CLA 2010-06-19 02:05:23 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 315407.
Comment 3 Eike Stepper CLA 2010-06-29 04:50:20 EDT
Rebasing all outstanding enhancements requests to version 4.0
Comment 4 Eike Stepper CLA 2010-07-05 11:11:18 EDT
Created attachment 173443 [details]
Patch v1
Comment 5 Eike Stepper CLA 2010-07-05 15:45:25 EDT
Created attachment 173474 [details]
Patch v2
Comment 6 Eike Stepper CLA 2010-07-06 06:03:45 EDT
Committed to HEAD
Comment 7 Eike Stepper CLA 2011-06-23 03:40:44 EDT
Available in R20110608-1407