Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318876 - Mechanism for avoiding dangling refs can introduce spurious conflicts
Summary: Mechanism for avoiding dangling refs can introduce spurious conflicts
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Caspar D. CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-05 07:18 EDT by Caspar D. CLA
Modified: 2011-06-23 03:41 EDT (History)
1 user (show)

See Also:
stepper: review+


Attachments
Patch including test case (8.12 KB, patch)
2010-07-06 05:58 EDT, Caspar D. CLA
no flags Details | Diff
Patch v2 including testcase (11.56 KB, patch)
2010-07-06 06:54 EDT, Caspar D. CLA
no flags Details | Diff
Fix+Test v3 - reformatted (12.10 KB, patch)
2010-07-06 07:46 EDT, Eike Stepper CLA
no flags Details | Diff
Fix+test v4 (12.07 KB, patch)
2010-07-06 08:25 EDT, Caspar D. CLA
no flags Details | Diff

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