Community
Participate
Working Groups
Build Identifier: 4.0 When revisions are revised on rawImport, the revisions for deleted objects will not be updated. Here is a snipped from our database and the used query to illustrate why it won't revise: CDO_ID CDO_VERSION CDO_BRANCH CDO_CLASS CDO_CREATED CDO_REVISED CDO_RESOURCE CDO_CONTAINER CDO_FEATURE ID LASTEDITTIME LASTEDITNAME DESCRIPTION CREATIONTIME NAME BEGINTIME ENDTIME 58 3820 -3 0 633 1285226606812 0 0 0 0 null null null null null null null null 59 3820 1 0 633 1285226492637 1285226550423 0 16 -5 e6cadea4-b7df-4788-9122-4ba39b35f138 2010-09-23 09:21:31.673 O1-User 1 null 2010-09-23 09:21:28.048 DeleteMe2 null null 60 3820 2 0 633 1285226550424 0 0 16 -5 e6cadea4-b7df-4788-9122-4ba39b35f138 2010-09-23 09:22:30.414 O1-User 1 null 2010-09-23 09:21:28.048 DeleteMe2 null null Query: SELECT cdo1.cdo_id, cdo1.cdo_branch, cdo1.cdo_version, cdo2.cdo_created FROM base_layer_Rectangle cdo1, base_layer_Rectangle cdo2 WHERE cdo1.cdo_id=cdo2.cdo_id AND cdo1.cdo_branch=cdo2.cdo_branch AND cdo1.cdo_version=cdo2.cdo_version-1 AND cdo1.cdo_revised=0 Since the deleted version (-3) is not the version-1 before deletion (2) it won't get revised. This will be a problem when merging, as the generated changeSets do not contain the detached objects. I'm not sure if this problem also occurs somewhere else, just noticed it in this case. Reproducible: Always Steps to Reproduce: 1. Use offlineRepository with rawReplication, create object. 2. Go offline, delete object online, go online again. 3. Let the rawReplication do it's work.
Created attachment 179455 [details] Testcase The attached test contains a merge which should usually fail because the same object was modified offline while deleted online. However, since the changeSet does not contain the detached object (because of the bug), the following exception is thrown on commit: java.util.ConcurrentModificationException: Attempt by Transaction[4:-1] to modify historical revision: Customer@OID5:0v1
1) The number of lines that you changed is smaller than 250. confirmed. 2) You are the only author of these changed lines. confirmed. 3) You apply the EPL to these changed lines. confirmed.
Created attachment 179458 [details] Proposed patch I added the missing version check to the SQL query. 1) The number of lines that you changed is smaller than 250. confirmed. 2) You are the only author of these changed lines. confirmed. 3) You apply the EPL to these changed lines. confirmed.
Created attachment 179461 [details] Combined Patch - for future reference Thank you, Pascal!
Committed to HEAD
Created attachment 179757 [details] Patch v2 I was a bit hasty when posting the patch, it does not only revise the previous version for deleted revisions, but also the deleted version itself. Added another check to the SQL query so only one will get revised. 1) The number of lines that you changed is smaller than 250. confirmed. 2) You are the only author of these changed lines. confirmed. 3) You apply the EPL to these changed lines. confirmed.
reopened, because of better patch.
Committed patch v2 to HEAD
Available in R20110608-1407