Author: paristote
Date: 2011-02-25 03:27:21 -0500 (Fri, 25 Feb 2011)
New Revision: 4016
Modified:
jcr/branches/1.12.x/patch/1.12.8-GA/JCR-1584/readme.txt
Log:
JCR-1584 update the readme
Modified: jcr/branches/1.12.x/patch/1.12.8-GA/JCR-1584/readme.txt
===================================================================
--- jcr/branches/1.12.x/patch/1.12.8-GA/JCR-1584/readme.txt 2011-02-25 03:02:49 UTC (rev
4015)
+++ jcr/branches/1.12.x/patch/1.12.8-GA/JCR-1584/readme.txt 2011-02-25 08:27:21 UTC (rev
4016)
@@ -9,40 +9,40 @@
Problem description
What is the problem to fix?
+ConstraintViolationException when Importing Version history of an nt:folder node having
an nt:file child node.
+Steps to reproduce:
- * SysViewImporter tests nt:versionedChild nodes - does it allowed as child for
nt:folder node. This is incorrevt, since nt:versionedChild allowed in any place below
frozen node.
- * SystemViewStreamExporter exports pure nodes Version history. It is correct. But
there is problem when we import version history of node, that have versionable subnode.
And remove this node tree after export. In this case version history of versioned subnode
will be lost.
+ 1. Create a web content named for example wc1
+ 2. Under wc1/medias/images add a node of type nt:file (upload an image for example
IMG_0374.JPG)
+ 3. Create many versions of this document
+ 4. Export wc1 with its version history in the system view format
+ 5. Stop the server,clean the database and start the server again
+ 6. Import wc1 with its version history
+ In console, there is a ConstraintViolationException.
Fix description
+Problem analysis
+The issue comes from the export data process, there is something wrong with the exported
data:
+
+ * Before exporting, the primary type of "IMG_0374.JPG" node is nt:file.
After exporting, it becomes nt:versionedChild
+ * In importing process, because nt:versionedChild node type is not allowed as
child's node type for parent node type (nt:folder) so
nodeTypeDataManager.isChildNodePrimaryTypeAllowed() function returns false and an
ConstraintViolationException is thrown.
+
+Root cause: SysViewImporter tests nt:versionedChild nodes whether it is allowed as child
for nt:folder node. This is incorrect, since nt:versionedChild is allowed in any place
below frozen node.
+
How is the problem fixed?
* In case if exported node is nt:versionableChild and it is a descendant of frozen
node - there is no child node primary type validation.
- * SystemViewStreamExporter exports versioned subnodes version history as
sv:versionedChild structure into <sv:node>nt:verstionedChild</sv:node>
- * SysViewImporter imports all version histories in <sv:versionedChild> tags,
and stores these version UUIDs in Context as "importedSubversions"-named list.
- * VersionHistoryImporter uses this list to update versionable child node properties
(versionHistory, baseVerasion, predecessors) with actual values.
Patch information:
-Patch files: JCR-1584.patch
+Patch files: JCR-1584.patch
Tests to perform
Reproduction test
- * Steps to reproduce:
- 1)Create a web content named for example wc1
- 2)Under wc1/medias/images add a node of type nt:file(upload an image for example
IMG_0374.JPG)
- 3)Create many version of this document
- 3)Export wc1 with its version history in the system view format
- 4)Stop the server,clean the database and start the server again
- 5)Import wc1 with its version history
- In console, you will get a ConstraintViolationException
+ * Cf. above
-After investigation, the root cause comes from the export data process, there is
something wrong with the exported data (the attached image shows it):
-
- * Before exporting, the primary type of "IMG_0374.JPG" node is nt:file.
After exporting, it becomes nt:versionedChild
- * In importing process, because nt:versionedChild node type is not allowed as
child's node type for parent node type (nt:folder) so
nodeTypeDataManager.isChildNodePrimaryTypeAllowed() function returns false and an
ConstraintViolationException is throwed
-
Tests performed at DevLevel
* Patch contains TestImportVersionedChild
@@ -70,11 +70,11 @@
Can this bug fix have any side effects on current client projects?
- * SysViewExporter class has new constructor with additional parameter.
+ * no
Is there a performance risk/cost?
- * Yes. There are additional validations. Also export/import of big nodes tree with
many versionable nodes may take more time.
+ * Yes. There are additional validations at import.
Validation (PM/Support/QA)
@@ -86,4 +86,5 @@
QA Feedbacks
*
+Labels parameters
Show replies by date