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

Jukka Zitting commented on OAK-781:
-----------------------------------

Looks good. Some comments:

* We could simplify the Head class by having MemoryNodeBuilder methods directly 
call the read() and write() methods on the current head.
* The read(), write() and getNodeState() methods of Head might be better called 
getCurrentNodeState(), getMutableNodeState() and getImmutableNodeState(). The 
semantics would be that the "current" state is either mutable or immutable and 
can only be considered stable across one method call, just like the read() 
method now behaves.
* We could avoid the instanceof check by pushing Head.getNodeState() (or 
getImmutableNodeState() as suggested above) down to the subclasses.
* The ConnectedHead.read() method shouldn't have a need to check the base 
revision, as MutableNodeState.reset() on the root state will already take care 
of refreshing all connected states.
                
> Clarify / fix effects of MISSING_NODE as base state of NodeBuilder
> ------------------------------------------------------------------
>
>                 Key: OAK-781
>                 URL: https://issues.apache.org/jira/browse/OAK-781
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: Michael Dürig
>         Attachments: 
> 0001-OAK-781-Clarify-fix-effects-of-MISSING_NODE-as-base-.patch, 
> memorynodebuilder-1.png, memorynodebuilder-2.png, OAK-781-2.patch, 
> OAK-781.patch
>
>
> Having a {{MISSING_NODE}} respectively a node state that returns false for 
> its {{exists}} method as a base state of a node builder results in undefined 
> behaviour. We need to clarify how to handle such cases for resolving OAK-766.

--
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

Reply via email to