Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342135 - [DB] CDOCommitInfo detached objects list is empty
Summary: [DB] CDOCommitInfo detached objects list is empty
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.db (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-07 06:36 EDT by Szabolcs Bardy CLA
Modified: 2011-06-23 03:38 EDT (History)
1 user (show)

See Also:


Attachments
Unit test to reproduce the error (3.04 KB, patch)
2011-04-07 06:42 EDT, Szabolcs Bardy CLA
stepper: iplog+
Details | Diff
Patch v1 (includes test) (9.66 KB, patch)
2011-04-11 03:16 EDT, Eike Stepper CLA
no flags Details | Diff
Patch v2 (9.73 KB, patch)
2011-04-11 08:51 EDT, Eike Stepper CLA
no flags Details | Diff
Patch v3 (different approach) (10.19 KB, patch)
2011-04-12 02:43 EDT, 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 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