[ https://issues.apache.org/jira/browse/OAK-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13645658#comment-13645658 ]
Michael Dürig commented on OAK-781: ----------------------------------- bq. The only bigger comment I have is about the way MutableNodeState instances are created and used. As discussed off line, this is a slight mismatch in the concept of how {{MutableNodeState}} instances are used: {{MutableNodeState.getChildNode(String name, boolean connect)}} returns "non connected" instances in the case where {{connect}} is false and a child {{name}} has not been modified before. This is in contrast to the initial idea where there should only ever be at most one {{MutableNodeState}} instance per path within the scope of a single root builder. [~jukkaz] came up with the idea of letting the head state be a generic NodeState that gets updated whenever headRevision grows, until content is changes in thus builder (or one of its descendants) in which case the head state becomes a {{MutableNodeState}} and will remain so from that point on. I quickly tried to come up with a patch for this but soon realised that this in a way puts us back into a pre OAK-781 situation where a lot of tricky state tracking was done in {{MemoryNodeBuilder}}. From this POV I prefer the current solution where we have a "dirty secret" in one place, which we could clearly mark and document. > 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, 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