[ https://issues.apache.org/jira/browse/OAK-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14651606#comment-14651606 ]
Tomek Rękawek edited comment on OAK-2776 at 8/3/15 8:47 AM: ------------------------------------------------------------ Together with Julian we were able to extend the way the user can control copying versions. Right now there are two parameters, described below. Regarding the {{OAK-2776-new.patch}}, it requires the OAK-2586. Because the current version of the patch from the OAK-2586 is not aligned to the latest trunk, I included the changes from OAK-2586 as well. {{--copy-versions=true|false|<date>}} * {{true}}: copy all versions (orphaned versions my be skipped via --copy-orphaned-versions) * {{false}}: copy no versions * {{<date>}}: copy all versions younger than date; date format: yyyy-mm-dd {{--copy-orphaned-versions=true|false|<date>}} * controls orphaned versions using the same semantics as the options of {{\--copy-versions}}, but only takes effect on orphaned versions that also fulfill the criteria of the {{\--copy-versions}} option * {{<date>}}: only takes effect if {{\--copy-versions=true}}, overruled by {{\--copy-versions=<date>|false}} These options could be used as follows to support various scenarios: *copy all versions* {noformat} --copy-versions=true --copy-orphaned-versions=true {noformat} *copy all referenced versions* {noformat} --copy-versions=true --copy-orphaned-versions=false {noformat} *copy all referenced versions (any age) and orphaned versions younger than 2015-01-01* {noformat} --copy-versions=true --copy-orphaned-versions=2015-01-01 {noformat} *copy no referenced versions* {noformat} --copy-versions=false --copy-orphaned-versions=* {noformat} *copy all versions (referenced and orphaned) younger 2015-01-01* {noformat} --copy-versions=2015-01-01 --copy-orphaned-versions=true|2015-01-01 (if 'true', max-age is inherited from --copy-versions) {noformat} or {noformat} --copy-versions=2015-01-01 --copy-orphaned-versions=true|1970-01-01 (max-age is inherited from --copy-versions) {noformat} *copy all referenced versions younger 2015-01-01* {noformat} --copy-versions=2015-01-01 --copy-orphaned-versions=false {noformat} was (Author: tomek.rekawek): Together with Julian we were able to extend the way the user can control copying versions. Right now there are two parameters, described below. Regarding the patch, it requires the OAK-2586. Because the current version of the patch from the OAK-2586 is not aligned to the latest trunk, I included the changes from OAK-2586 as well. {{--copy-versions=true|false|<date>}} * {{true}}: copy all versions (orphaned versions my be skipped via --copy-orphaned-versions) * {{false}}: copy no versions * {{<date>}}: copy all versions younger than date; date format: yyyy-mm-dd {{--copy-orphaned-versions=true|false|<date>}} * controls orphaned versions using the same semantics as the options of {{\--copy-versions}}, but only takes effect on orphaned versions that also fulfill the criteria of the {{\--copy-versions}} option * {{<date>}}: only takes effect if {{\--copy-versions=true}}, overruled by {{\--copy-versions=<date>|false}} These options could be used as follows to support various scenarios: *copy all versions* {noformat} --copy-versions=true --copy-orphaned-versions=true {noformat} *copy all referenced versions* {noformat} --copy-versions=true --copy-orphaned-versions=false {noformat} *copy all referenced versions (any age) and orphaned versions younger than 2015-01-01* {noformat} --copy-versions=true --copy-orphaned-versions=2015-01-01 {noformat} *copy no referenced versions* {noformat} --copy-versions=false --copy-orphaned-versions=* {noformat} *copy all versions (referenced and orphaned) younger 2015-01-01* {noformat} --copy-versions=2015-01-01 --copy-orphaned-versions=true|2015-01-01 (if 'true', max-age is inherited from --copy-versions) {noformat} or {noformat} --copy-versions=2015-01-01 --copy-orphaned-versions=true|1970-01-01 (max-age is inherited from --copy-versions) {noformat} *copy all referenced versions younger 2015-01-01* {noformat} --copy-versions=2015-01-01 --copy-orphaned-versions=false {noformat} > Upgrade should allow to skip copying versions > --------------------------------------------- > > Key: OAK-2776 > URL: https://issues.apache.org/jira/browse/OAK-2776 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: upgrade > Affects Versions: 1.2 > Reporter: Julian Sedding > Attachments: OAK-2776-new.patch, OAK-2776.patch > > > In some cases it is not necessary to copy version histories during an > upgrade. Skipping to copy versions can result in a lot less content that > needs copying and thus a significant speedup. > Additionally, OAK-2586 introduces the possibility to include and exclude > paths for an upgrade. Version histories should thus only be copied if their > respective versionable node is present in the copied part of the content. > Also reducing content being copied redundantly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)