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

Bug 339461

Summary: 2nd partial commit of 2nd reattachment gives ConcurrentModificationEx
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
Testcase (as a patch)
none
Patch (including testcase)
none
Patch v3 none

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