Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323930 - XRefExcluder does not use adjusted list indexes
Summary: XRefExcluder does not use adjusted list indexes
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard: offline-01
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-30 03:07 EDT by Eike Stepper CLA
Modified: 2011-06-23 03:42 EDT (History)
1 user (show)

See Also:


Attachments
Patch - for future reference (15.75 KB, patch)
2010-08-30 07:50 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 Eike Stepper CLA 2010-08-30 03:07:02 EDT
While ensuring referential integrity during commits the XRefExcluder is supposed to remove XRef candidates that are to be removed by the ongoing commit. For many-valued XRefs it does so by comparing the index of the XRef and RemoveFeatureDelta from the commit.

If the commit contains multiple feature deltas of type ListIndexAffecting this check may go wrong.
Comment 1 Eike Stepper CLA 2010-08-30 07:49:40 EDT
Aligning the incoming XRefs from the store accessor with the feature deltas of the ongoing commit is not only a hazzle (indexes would need to be adjusted). Rather it's not possible in all cases, as in the case of a REPLACE, i.e. a set(index, CDOID), because we can not deduce the old value from the delta.

Consequently I've removed the whole XRefExcluder (which used to do this alignment). Instead I've deferred the call to checkXRefs() until after computeDirtyObjects() has been called. This way the dirtyObjects can be used instead of the XRef data passed in from the store accessor.
Comment 2 Eike Stepper CLA 2010-08-30 07:50:09 EDT
Created attachment 177720 [details]
Patch - for future reference
Comment 3 Eike Stepper CLA 2010-08-30 07:53:18 EDT
Committed to HEAD
Comment 4 Eike Stepper CLA 2011-06-23 03:42:34 EDT
Available in R20110608-1407