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 "Tomek Rękawek (JIRA)" <ji...@apache.org> on 2017/06/06 11:32:18 UTC

[jira] [Commented] (OAK-6220) Copy on write node store implementation

    [ https://issues.apache.org/jira/browse/OAK-6220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16038672#comment-16038672 ] 

Tomek Rękawek commented on OAK-6220:
------------------------------------

Added a javadoc describing the current limitations:

{noformat}
 * <p>The copy-on-write (COW) node store implementation allows to temporarily
 * switch the repository into the "testing" mode, in which all the changes are
 * stored in a volatile storage, namely the MemoryNodeStore. After switching
 * back to the "production" mode, the test changes should be dropped.</p>
 *
 * <p>If the CoW is enabled, a special :cow=true property will be set on the
 * root node returned by getRoot(). It's being used in the merge() to decide
 * which store be modified. Removing this property will result in merging
 * changes to the main node store, even in the CoW mode.</p>
 *
 * <p>The checkpoint support is provided by the {@link BranchNodeStore} class.
 * All the existing checkpoints are still available in the CoW mode (until they
 * expire). New checkpoints are only created in the MemoryNodeStore.</p>
 *
 * <p>Known limitations:</p>
 *
 * <ul>
 *     <li>turning the CoW mode on and off requires cleaning up the
 *     <a href="https://jackrabbit.apache.org/oak/docs/query/lucene.html#copy-on-read">lucene
 *     indexing cache</a>,</li>
 *     <li>switching the CoW mode may result in repository inconsistencies
 *     (eg. if two merges belongs to the same logical commit sequence),</li>
 *     <li>in the CoW mode the changes are stored in MemoryNodeStore, so it
 *     shouldn't be enabled for too long (otherwise it may exhaust the heap).</li>
 * </ul>
{noformat}

Merged in [r1797777|https://svn.apache.org/r1797777].

> Copy on write node store implementation
> ---------------------------------------
>
>                 Key: OAK-6220
>                 URL: https://issues.apache.org/jira/browse/OAK-6220
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: core
>            Reporter: Tomek Rękawek
>            Assignee: Tomek Rękawek
>             Fix For: 1.8, 1.7.3
>
>         Attachments: OAK-6220-2.patch, OAK-6220-3.patch, OAK-6220.patch
>
>
> The copy-on-write (COW) node store implementation would allow to temporarily switch the repository into the "testing" mode, in which all the changes are saved in a reversible way. After switching back to the "production" mode, the test changes should be dropped.
> This should include checkpoints as well.
> Because the SegmentNodeStore supports COW natively, we may simply copy the / tree to some user-provided path and use it as a new root. For the DocumentNodeStore we'll need something more complex.



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