[ 
https://issues.apache.org/jira/browse/OAK-4529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcel Reutegger updated OAK-4529:
----------------------------------
    Attachment: OAK-4529.patch

Attached a work-in-progress patch. It introduces a new document in the settings 
collection that contains a format version. Reading the current and older 
versions is possible, but the DocumentNodeStore will fail to start when it 
detects a newer format than itself. A DocumentNodeStore can only write to a 
store with the same format version. An upgrade to a newer version must be 
'unlocked' first with an oak-run command. This only works when there are no 
active cluster nodes and the format to set is newer than the current one.

I would like to backport this to the branches as well, which means they would 
eventually also get protection against unintended upgrades or mixed (minor) 
version deployments that can corrupt the repository.

> DocumentNodeStore does not have a repository software version range check.
> --------------------------------------------------------------------------
>
>                 Key: OAK-4529
>                 URL: https://issues.apache.org/jira/browse/OAK-4529
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, documentmk
>    Affects Versions: 1.0.31, 1.2.14, 1.4.4, 1.5.4
>            Reporter: Ian Boston
>            Assignee: Marcel Reutegger
>             Fix For: 1.8
>
>         Attachments: OAK-4529.patch
>
>
> DocumentNodeStore does not currently check which software version the 
> persisted repository it is connecting to was created with or last updated. 
> There is a risk that if the versions are incompatible the repository may be 
> damaged.
> Somewhere in the repository, the version of the software that created it, and 
> the versions that written to it should be stored. In the case of TarMK this 
> information could be on local disk near the TarMK files. In the case of a 
> DocumentMK implementation, the information should be stored in the "database" 
> itself.
> When a DocumentNodeStore instance connects it should: check the versions 
> stored in the repository then check the versions are within a compatible 
> range and refuse to start if not.
> When a DocumentNodeStore writes to a repository, it should add its version to 
> the list of versions that have updated the repository.
> This check behaviour should be active in full Oak or any utilities (eg 
> oak-run).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to