You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2016/10/21 10:36:58 UTC
[jira] [Commented] (OAK-4970) Sidegrade disk usage issues related
to copying version storage
[ https://issues.apache.org/jira/browse/OAK-4970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15594750#comment-15594750 ]
Michael Dürig commented on OAK-4970:
------------------------------------
Yes, I can confirm this fixes the size increase and runtime. On my test repository (which contains many versionable nodes) sidegrade time went down from hours to just 4 minutes. Sizes goes from 3.6GB to 3.8GB (vs. to 34GB without the fix).
> Sidegrade disk usage issues related to copying version storage
> --------------------------------------------------------------
>
> Key: OAK-4970
> URL: https://issues.apache.org/jira/browse/OAK-4970
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: upgrade
> Reporter: Tomek Rękawek
> Fix For: 1.6
>
>
> 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:
> {noformat}
> --- 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);
> }
> {noformat}
> * the workspace name itself should be derived from the source repository (or should be configurable).
> // cc: [~mduerig]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)