Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-9728

Oak-Migrate: --copy-orphaned-versions does not work when version storage exists

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.42.0
    • None
    • upgrade
    • None

    Description

      I attempted to copy content from an old repository to a new repository with oak-upgrade 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.  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.

      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. 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.)

      Attachments

        Activity

          People

            Unassigned Unassigned
            hanspeterstoerr Hans-Peter Stoerr
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: