Bug 1006257 - Restoring a node which has non-versionable children fails
Restoring a node which has non-versionable children fails
Status: CLOSED CURRENTRELEASE
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: ModeShape (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity unspecified
: CR1
: ---
Assigned To: Horia Chiorean
: QA-Closed
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-10 06:25 EDT by Horia Chiorean
Modified: 2016-02-10 03:54 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-10 03:54:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker MODE-2034 Major Closed Can't do restore while a node has multiple chidren 2014-02-17 07:49:09 EST

  None (edit)
Description Horia Chiorean 2013-09-10 06:25:53 EDT
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 07:21:49 EDT
Horia Chiorean <hchiorea@redhat.com> 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 08:36:13 EDT
Angelo Chen <angelo.chen@xplusz.com> 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 08:37:20 EDT
Angelo Chen <angelo.chen@xplusz.com> 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 08:39:27 EDT
Horia Chiorean <hchiorea@redhat.com> 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 15:31:35 EDT
Randall Hauch <rhauch@jboss.org> 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 05:20:59 EDT
Randall Hauch <rhauch@jboss.org> updated the status of jira MODE-2034 to Closed
Comment 12 belong 2013-11-19 18:18:42 EST
Fixed before GA - setting to requires_doc_text- accordingly
Comment 13 Filip Nguyen 2014-02-17 07:49:03 EST
Fix verified in GA.

Note You need to log in before you can comment on or make changes to this bug.