Tomek Rękawek created OAK-4970:
----------------------------------
Summary: Optimize the version copying performance during sidegrade
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)