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

Chetan Mehrotra commented on OAK-4512:
--------------------------------------

[~florin.iordache] As noted in OAK-4513 

# Would need an accompanying testcase which validates the implementation 
# Make it an OSGi component which registers the validator only when multiple 
mount points are configured 

{noformat}
+        private Validator logReadOnlyMountCommit(String nodeName, NodeState 
nodeState) throws CommitFailedException {
+            Tree nodeStateTree = TreeFactory.createReadOnlyTree(nodeState);
+            String nodePath = nodeStateTree.getPath();
+            String changeNodePath = nodeStateTree.isRoot()
+                    ? nodePath + nodeName
+                    : nodePath + "/" + nodeName;
{noformat}

This would not work as {{nodePath}} would always be '/'. You would need to 
manage the current path as you traverse down. 

> Detect and log commits to the read-only stores
> ----------------------------------------------
>
>                 Key: OAK-4512
>                 URL: https://issues.apache.org/jira/browse/OAK-4512
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Florin Iordache
>         Attachments: OAK-4512-patch.diff
>
>
> Since the read-only stores will be immutable we should be able to detect 
> commits made against them and log an error message via a commit validation 
> provider.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to