Description
Following performance improvements are possible in the sidegrade:
- if the parameters related to copying versions are not used, we can copy the version storage as-is and skip the VersionableEditor,
- inside the VersionableEditor we should check whether the versionable path already exists:
--- oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/version/VersionableEditor.java +++ oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/version/VersionableEditor.java @@ -163,7 +163,9 @@ private void setVersionablePath(String versionableUuid) { final NodeBuilder versionHistory = VersionHistoryUtil.getVersionHistoryBuilder(versionStorage, versionableUuid); - versionHistory.setProperty(provider.workspaceName, path, Type.PATH); + if (!versionHistory.hasProperty(provider.workspaceName)) { + versionHistory.setProperty(provider.workspaceName, path, Type.PATH); + } addMixin(versionHistory, MIX_REP_VERSIONABLE_PATHS); }
- the workspace name itself should be derived from the source repository (or should be configurable).
// cc: mduerig
Attachments
Issue Links
- Is contained by
-
OAK-5290 Backport the performance improvements for oak-upgrade from trunk
- Closed