[
https://issues.apache.org/jira/browse/OAK-4180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15401557#comment-15401557
]
Chetan Mehrotra edited comment on OAK-4180 at 8/9/16 9:03 AM:
--------------------------------------------------------------
All planned work done. Specific issues can be opened going forward.
To enable this feature one needs to configure a SegmentNodeStore in secondary
mode.
Create OSGi config file
{{org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.cfg}} with
following content
{noformat}
secondary=true
{noformat}
And then configure
{{org.apache.jackrabbit.oak.plugins.document.secondary.SecondaryStoreCacheService.config}}
with config
{noformat}
includedPaths=[ \
"/",
]
{noformat}
This determines what all paths are included for storage in secondary node store
While enabling this feature we need to disable persistent cache for nodes and
node children
{noformat}
persistentCache="repository/cache,size\=1024,binary\=0,-nodes,-children"
{noformat}
was (Author: chetanm):
All planned work done. Specific issues can be opened going forward.
To enable this feature one needs to configure a SegmentNodeStore in secondary
mode.
Create OSGi config file
{{org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.cfg}} with
following content
{noformat}
secondary=true
{noformat}
And then configure
{{org.apache.jackrabbit.oak.plugins.document.secondary.SecondaryStoreCacheService.config}}
with config
{noformat}
includedPaths=[ \
"/",
]
{noformat}
This determines what all paths are included for storage in secondary node store
> Use another NodeStore as a local cache for a remote Document store
> ------------------------------------------------------------------
>
> Key: OAK-4180
> URL: https://issues.apache.org/jira/browse/OAK-4180
> Project: Jackrabbit Oak
> Issue Type: New Feature
> Components: documentmk
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Labels: docs-impacting
> Fix For: 1.6, 1.5.7
>
> Attachments: OAK-4180-v1.patch
>
>
> DocumentNodeStore makes use of persistent cache to speed up its processing
> and save on making remote calls for data already present in cache
> In addition to that we can look into make use of Segment NodeStore as kind of
> "local copy" for certain paths in repository and route calls to it if
> possible. As part of this task I would like to prototype such an approach. At
> high level it would work as below
> # At start bootstrap the setup and shutdown it down
> # Use a modified "sidegrade" and copy over the NodeStats from Document store
> to Segment store. In such a copy we also store some Document specific
> properties like {{readRevision}} and {{lastRevision}} as hidden property in
> Segment NodeStates
> # In DocumentNodeStore we refactor the current code to extract a
> ## {{AbstractDocumentNodeState}} - Abase class which has some logic move out
> from {{DocumentNodeState}}
> ## {{SegmentDocumentNodeState}} extends above and delegate calls to a wrapped
> {{SegmentNodeState}}
> ## {{DocumentNodeState}} would also extend {{AbstractDocumentNodeState}} and
> hence delegate to some calls to parent. In this when a call comes for
> {{getChildNode}} it can check if that can be served by a local copy of
> {{SegmentNodeStore}} for given {{rootRevision}} then it delegates to that
> # For update plan is to make use of {{Observer}} which listens to changes and
> updates the local copy for certain configured paths.
> ## Key aspect to address here is handle the restart case where in a cluster a
> specific node restarts after some time then how it refreshes itself there
> *Usage*
> Following 2 OSGi configs would need to be seed
> * org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.config
> {noformat}
> secondary=B"true"
> {noformat}
> *
> org.apache.jackrabbit.oak.plugins.document.secondary.SecondaryStoreCacheService.config
> {noformat}
> includedPaths=[ \
> "/",
> ]
> {noformat}
> With these settings if DocumentNodeStoreService gets started it would pickup
> the cache and use it. Change {{includedPaths}} depending on paths in
> repository which you want to include in secondary store t
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)