[
https://issues.apache.org/jira/browse/OAK-9728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17509015#comment-17509015
]
Hans-Peter Stoerr edited comment on OAK-9728 at 3/18/22, 8:08 PM:
------------------------------------------------------------------
By the way: do you see any workaround to this problem? Even if this bug is
fixed in future versions - that doesn't help us until the new version is
released and used in the Sling Starter.
--include-paths=/jcr:system/jcr:versionStorage
--merge-paths=/jcr:system/jcr:versionStorage doesn't work, either.
was (Author: hanspeterstoerr):
By the way: do you see any workaround to this problem? Even if this bug is
fixed in future versions - that doesn't help us until the new version is
released and used in the Sling Starter.
> Oak-Migrate: --copy-orphaned-versions does not work when version storage
> exists
> -------------------------------------------------------------------------------
>
> Key: OAK-9728
> URL: https://issues.apache.org/jira/browse/OAK-9728
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: upgrade
> Affects Versions: 1.42.0
> Reporter: Hans-Peter Stoerr
> Priority: Major
>
> I attempted to copy content from an old repository to a new repository with
> [oak-upgrade|https://jackrabbit.apache.org/oak/docs/migration.html] while
> using --copy-orphaned-versions . Due to an old bugfix
> https://issues.apache.org/jira/browse/OAK-5112 it turns out that this does
> not actually copy these: when the new repository already contains a version
> storage, the orphaned versions are not copied: see [this line in
> RepositorySidegrade|https://github.com/apache/jackrabbit-oak/blob/383264174181e7be751214bbca669996fd1f6b73/oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/RepositorySidegrade.java#L284].
> There is a log message "The version storage on destination already exists.
> Orphaned version histories will be skipped.".
> I'm reporting this as a bug since that is [not consistent with the
> documentation|https://jackrabbit.apache.org/oak/docs/migration.html].
> By the way: the orphaned versions we need copied are orphaned in the sense
> that there aren't any checked out mix:versionables for them anymore. But they
> are actually strongly referenced through a property of type
> [javax.jcr.PropertyType.REFERENCE|https://developer.adobe.com/experience-manager/reference-materials/spec/jsr170/javadocs/jcr-1.0/javax/jcr/PropertyType.html#REFERENCE].
> So, not copying these version histories does actually lead to an
> inconsistent JCR repository. Thus, there is a good case to be made that these
> should be copied even in the absence of --copy-orphaned-versions. So, one way
> to solve is to just document this behaviour, but fix the problem that
> versions referenced through other means than existing versionables would also
> be copied. (In a way that'd even help us, since that'd copy only what's
> actually used.)
--
This message was sent by Atlassian Jira
(v8.20.1#820001)