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

Bug 318876

Summary: Mechanism for avoiding dangling refs can introduce spurious conflicts
Product: [Modeling] EMF Reporter: Caspar D. <caspar_d>
Component: cdo.coreAssignee: Caspar D. <caspar_d>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: saulius.tvarijonas
Version: 4.0Flags: stepper: review+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch including test case
none
Patch v2 including testcase
none
Fix+Test v3 - reformatted
none
Fix+test v4 none

Description Caspar D. CLA 2010-07-05 07:18:57 EDT
As a solution to bug 298561, I introduced a mechanism that
removes locally new (i.e. uncommitted) references pointing
to objects that are about to be removed/invalidated because
of an incoming update/refresh.

This mechanism is flawed in that it will also remove such
references if the target pointed to is CLEAN. If the
reference has an eOpposite, this removal itself will make
the target DIRTY (due to implicit adjustment of the
eOpposite ref), even though the user did not modify the
object. Immediately afterwards, the actual invalidation is
performed, and invalidating the now DIRTY object puts it in
INVALID_CONFLICT state while it should have just been
INVALID (i.e. remotely detached).

Working on fix.
Comment 1 Caspar D. CLA 2010-07-06 05:58:21 EDT
Created attachment 173520 [details]
Patch including test case
Comment 2 Caspar D. CLA 2010-07-06 06:54:46 EDT
Created attachment 173527 [details]
Patch v2 including testcase

This patch includes changes to the older testcase for bug 298561.
Comment 3 Eike Stepper CLA 2010-07-06 07:46:09 EDT
Created attachment 173531 [details]
Fix+Test v3 - reformatted
Comment 4 Caspar D. CLA 2010-07-06 08:25:31 EDT
Created attachment 173537 [details]
Fix+test v4
Comment 5 Caspar D. CLA 2010-07-06 08:36:16 EDT
Committed to HEAD.
Comment 6 Caspar D. CLA 2010-07-06 08:37:18 EDT
Should be fixed in 3.0 maintenance also! (Will open separate Zilla.)
Comment 7 Eike Stepper CLA 2011-06-23 03:41:06 EDT
Available in R20110608-1407