[jira] [Commented] (OAK-783) Reflect Move and Rename upon Root#commit

2013-10-24 Thread JIRA

[ 
https://issues.apache.org/jira/browse/OAK-783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13804194#comment-13804194
 ] 

Michael Dürig commented on OAK-783:
---

At http://svn.apache.org/r1535380. I committed an initial implementation for 
move detection in the {{MoveDetector}} class. A {{MoveDetector}} is a 
{{Validator}} that can detect certain move operations and reports these to a 
wrapped {{MoveValidator}} by calling its {{move()}}. That method is called 
additional to {{MoveValidator.childNodeAdded()}} for the destination of the 
move operation and {{MoveValidator.childNodeDeleted()}} for the source of the 
move operation.

Detection of move operations relies on the presence of the {{:source-path}} 
property on moved nodes. New nodes with this property set have been moved from 
the path indicated by the value of the property to its current location.

Limitations:
* Moving a moved node only reports one move from the original source to the 
final target.
* Moving a transiently added node is not reported as a move operation but as an 
add operation on the move target.
* Moving a child node of a transiently moved node is not reported as a move 
operation but as an add operation on the move target.
* Moving a node back and forth to its original location is not reported at all.

I will add further tests to {{MoveDetectorTest}} demonstrating these 
limitations. 

 Reflect Move and Rename upon Root#commit
 

 Key: OAK-783
 URL: https://issues.apache.org/jira/browse/OAK-783
 Project: Jackrabbit Oak
  Issue Type: Bug
  Components: core
Reporter: angela

 right now rename and move operations cannot be identified during 
 commit processing in validators or commit hooks.
 for proper (and backwards compatible) permission evaluation however
 we need the ability to distinguish between moving a node around or
 having nodes + properties being removed and added.
 during the last oakathon michael and myself had a discussion regarding
 that issue and michael convinced me that this can't be achieved by simply
 passing the move information contained in RootImpl to the commit hook.
 therefore creating this issue to track progress and discussions regarding
 move and renaming.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (OAK-783) Reflect Move and Rename upon Root#commit

2013-10-24 Thread angela (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13804204#comment-13804204
 ] 

angela commented on OAK-783:


cool... thanks for the effort. very much appreciated. 
i will use it in the permission validator and can also add more permission 
related tests to see/demonstrate how big the impact of the limitations will be 
in that area.

 Reflect Move and Rename upon Root#commit
 

 Key: OAK-783
 URL: https://issues.apache.org/jira/browse/OAK-783
 Project: Jackrabbit Oak
  Issue Type: Bug
  Components: core
Reporter: angela

 right now rename and move operations cannot be identified during 
 commit processing in validators or commit hooks.
 for proper (and backwards compatible) permission evaluation however
 we need the ability to distinguish between moving a node around or
 having nodes + properties being removed and added.
 during the last oakathon michael and myself had a discussion regarding
 that issue and michael convinced me that this can't be achieved by simply
 passing the move information contained in RootImpl to the commit hook.
 therefore creating this issue to track progress and discussions regarding
 move and renaming.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (OAK-783) Reflect Move and Rename upon Root#commit

2013-10-23 Thread JIRA

[ 
https://issues.apache.org/jira/browse/OAK-783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13802891#comment-13802891
 ] 

Michael Dürig commented on OAK-783:
---

Initial prototype: 
https://github.com/mduerig/jackrabbit-oak/commit/a74ea2095d5a3aea2e27dbc0b18038eec11f315a

 Reflect Move and Rename upon Root#commit
 

 Key: OAK-783
 URL: https://issues.apache.org/jira/browse/OAK-783
 Project: Jackrabbit Oak
  Issue Type: Bug
  Components: core
Reporter: angela

 right now rename and move operations cannot be identified during 
 commit processing in validators or commit hooks.
 for proper (and backwards compatible) permission evaluation however
 we need the ability to distinguish between moving a node around or
 having nodes + properties being removed and added.
 during the last oakathon michael and myself had a discussion regarding
 that issue and michael convinced me that this can't be achieved by simply
 passing the move information contained in RootImpl to the commit hook.
 therefore creating this issue to track progress and discussions regarding
 move and renaming.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (OAK-783) Reflect Move and Rename upon Root#commit

2013-04-18 Thread JIRA

[ 
https://issues.apache.org/jira/browse/OAK-783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13635226#comment-13635226
 ] 

Michael Dürig commented on OAK-783:
---

We could attach the path of the source of a moved node (i.e. the path it has in 
its base revision) to that node. We could use some kind of a hidden property 
which is never persisted for that. That is, the property is attached when the 
transient move is initiated, it is used in the commit hooks to determine 
whether an add node event is effectively the result of a moved node, and it 
would be removed (ignored) when persisting the branch on commit. 

AFAIK this information would be enough to regain a sequence of move operations 
that would take the base state to the current head state. See 
https://github.com/apache/jackrabbit-oak/blob/trunk/doc/jsop-diff.md for a 
description of such an algorithm and https://github.com/mduerig/json-diff for a 
POC implementation. 

 Reflect Move and Rename upon Root#commit
 

 Key: OAK-783
 URL: https://issues.apache.org/jira/browse/OAK-783
 Project: Jackrabbit Oak
  Issue Type: Bug
  Components: core
Reporter: angela

 right now rename and move operations cannot be identified during 
 commit processing in validators or commit hooks.
 for proper (and backwards compatible) permission evaluation however
 we need the ability to distinguish between moving a node around or
 having nodes + properties being removed and added.
 during the last oakathon michael and myself had a discussion regarding
 that issue and michael convinced me that this can't be achieved by simply
 passing the move information contained in RootImpl to the commit hook.
 therefore creating this issue to track progress and discussions regarding
 move and renaming.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira