Bug 1006257

Summary: Restoring a node which has non-versionable children fails
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Horia Chiorean <hchiorea>
Component: ModeShapeAssignee: Horia Chiorean <hchiorea>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: fnguyen, ldimaggi
Target Milestone: CR1Keywords: QA-Closed
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-10 08:54:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Horia Chiorean 2013-09-10 10:25:53 UTC
Create a node with a couple of non-versionable children and 2 checkpoints for that node (via versionManager.checkpoint). After that, attempting to restore version "1.0" produces an exception.

Comment 1 JBoss JIRA Server 2013-09-10 11:21:49 UTC
Horia Chiorean <hchiorea> made a comment on jira MODE-2034

Fixed the restore operation of a parent with 2 unversioned children.

[~angelo.chen] thanks for the submitted files, the fix is very similar to your changes.

Comment 2 JBoss JIRA Server 2013-09-10 12:36:13 UTC
Angelo Chen <angelo.chen> made a comment on jira MODE-2034

@Horia Chiorean, I'm not sure whether the rename has the same issue.
-                    // See if this child has been removed ...
-                    if (changes.isRemoved(next)) continue;
+                    // See if this child has been removed but not inserted ...
+                    if (changes.isRemoved(next) && changes.inserted(next.getKey()) == null) continue;

how about the child has been removed and renamed?

Comment 3 JBoss JIRA Server 2013-09-10 12:37:20 UTC
Angelo Chen <angelo.chen> made a comment on jira MODE-2034

@hchiorean, I'm not sure whether the rename has the same issue.
-                    // See if this child has been removed ...
-                    if (changes.isRemoved(next)) continue;
+                    // See if this child has been removed but not inserted ...
+                    if (changes.isRemoved(next) && changes.inserted(next.getKey()) == null) continue;

how about the child has been removed and renamed?

Comment 4 JBoss JIRA Server 2013-09-10 12:39:27 UTC
Horia Chiorean <hchiorea> made a comment on jira MODE-2034

[~angelo.chen]: a node should not appear both as removed and renamed, from a transient changes perspective. This is only specific to "orderBefore".

Comment 5 JBoss JIRA Server 2013-09-10 19:31:35 UTC
Randall Hauch <rhauch> made a comment on jira MODE-2034

Rebased and merged the PR into the 'master' branch. Leaving open to be cherry-picked onto '3.3.x-prod-ip6.0'.

Comment 11 JBoss JIRA Server 2013-10-24 09:20:59 UTC
Randall Hauch <rhauch> updated the status of jira MODE-2034 to Closed

Comment 12 belong 2013-11-19 23:18:42 UTC
Fixed before GA - setting to requires_doc_text- accordingly

Comment 13 Filip Nguyen 2014-02-17 12:49:03 UTC
Fix verified in GA.