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

Bug 342135

Summary: [DB] CDOCommitInfo detached objects list is empty
Product: [Modeling] EMF Reporter: Szabolcs Bardy <szbardy>
Component: cdo.dbAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: zstorok
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Unit test to reproduce the error
stepper: iplog+
Patch v1 (includes test)
none
Patch v2
none
Patch v3 (different approach) none

Description Szabolcs Bardy CLA 2011-04-07 06:36:11 EDT
Build Identifier: 

When loading a commit info based on the timestamp of the commit using cdoSession.getCommitInfoManager().getCommitInfo(timeStamp), the detached objects list will be always empty, even if an object has been deleted from the repository with the commmit. 
Expected behaviour would be that the detached objects list contains the CDOIDs of the deleted objects.

Reproducible: Always
Comment 1 Szabolcs Bardy CLA 2011-04-07 06:42:08 EDT
Created attachment 192718 [details]
Unit test to reproduce the error
Comment 2 Eike Stepper CLA 2011-04-11 02:49:40 EDT
For the MEMStore the test case passes. But it fails for the DBStore. Moving to cdo.db
Comment 3 Eike Stepper CLA 2011-04-11 02:50:54 EDT
In order to commit the attached test case, please confirm that:

1) The number of lines that you changed is smaller than 250.
2) You are the only author of these changed lines.
3) You apply the EPL to these changed lines.
Comment 4 Eike Stepper CLA 2011-04-11 03:16:45 EDT
Created attachment 192915 [details]
Patch v1 (includes test)
Comment 5 Szabolcs Bardy CLA 2011-04-11 03:59:03 EDT
(In reply to comment #3)
> In order to commit the attached test case, please confirm that:
> 
> 1) The number of lines that you changed is smaller than 250.
> 2) You are the only author of these changed lines.
> 3) You apply the EPL to these changed lines.

I can confirm these statements.

Regards,
Szabolcs
Comment 6 Eike Stepper CLA 2011-04-11 08:51:01 EDT
Created attachment 192926 [details]
Patch v2
Comment 7 Eike Stepper CLA 2011-04-12 02:43:58 EDT
Created attachment 192999 [details]
Patch v3 (different approach)
Comment 8 Eike Stepper CLA 2011-04-12 02:46:17 EDT
The new approach does not change the handleRevisions() method in the mapping strategies because they are used in too many other contexts. Rather it calculates the list of detached objects by counting additions and removals in the changed objects.
Comment 9 Eike Stepper CLA 2011-04-12 03:01:10 EDT
Committed revision 7607:
- trunk/plugins/org.eclipse.emf.cdo.server
- trunk/plugins/org.eclipse.emf.cdo.tests
Comment 10 Eike Stepper CLA 2011-04-12 03:01:34 EDT
Resolved.
Comment 11 Eike Stepper CLA 2011-06-23 03:38:21 EDT
Available in R20110608-1407