Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339461 - 2nd partial commit of 2nd reattachment gives ConcurrentModificationEx
Summary: 2nd partial commit of 2nd reattachment gives ConcurrentModificationEx
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: 2011-03-10 00:04 EST by Caspar D. CLA
Modified: 2011-06-23 03:42 EDT (History)
1 user (show)

See Also:
stepper: review+


Attachments
Testcase (as a patch) (2.86 KB, patch)
2011-03-10 00:08 EST, Caspar D. CLA
no flags Details | Diff
Patch (including testcase) (3.92 KB, patch)
2011-03-10 00:16 EST, Caspar D. CLA
no flags Details | Diff
Patch v3 (3.95 KB, patch)
2011-03-10 03:03 EST, 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 Caspar D. CLA 2011-03-10 00:04:49 EST
Bug description courtesy of Egidijus:

"When [using partial commits] ... Moving class from one package to
another triggers CDO reattach action, which attempts to restore
revision from the formerRevisionKeys for transient object. After
first commit was triggered, CDO attempted to clean
formerRevisionKeys in CDOTransationImpl.cleanUp. If it is not
partial commit, then formerRevisionKeys is whole cleared, but if
we have partial commit, then it clears entries only for detached
elements (revisions for dirty elements are left). Second time on
reattaching element, code doesn't update formerRevisionKeys (on
detach) with newer revision and reattaching accomplishes its
action, by restoring version from stale revision, constructed from
the previous reattach action (we have version regression). Server
side on commit throws exceptions."

Additional note from me: the object being reattached is *included* in
both the first and 2nd partial commit.
Comment 1 Caspar D. CLA 2011-03-10 00:08:19 EST
Created attachment 190817 [details]
Testcase (as a patch)
Comment 2 Caspar D. CLA 2011-03-10 00:16:39 EST
Created attachment 190818 [details]
Patch (including testcase)
Comment 3 Eike Stepper CLA 2011-03-10 03:03:36 EST
Created attachment 190827 [details]
Patch v3

Just reformatted.
Comment 4 Caspar D. CLA 2011-03-10 03:13:01 EST
Committed revision 7437.
Comment 5 Eike Stepper CLA 2011-06-23 03:42:20 EDT
Available in R20110608-1407