Hi,

On Fri, Oct 5, 2012 at 9:58 AM, Michael Dürig <[email protected]> wrote:
> However in the case of a move operation I think this would cause the above
> test case to fail, since x.getParent() would then still point to the root.

Yes, the test case would need to be adapted. I filed OAK-391 [1] to
track this issue.

> Maybe we could just throw an InvalidItemStateException for such cases?

The trouble is that a parent doesn't have a direct reference to a
child and can thus not tell it that it has become invalid. The only
way I can think of to solve this issue is for the child to ask the
parent about the status whenever accessed, a bit like what
MemoryNodeBuilder now does.

> This would simplify things considerably, let us get rid of the children weak
> refs, and might also open up a way to reduce the number of re-resolves
> taking place. As Marcel pointed out yesterday, the latter also shows up
> as bottleneck in read performance.

Indeed, I'm also seeing it show up quite a bit when profiling our
existing benchmarks.

[1] https://issues.apache.org/jira/browse/OAK-391

BR,

Jukka Zitting

Reply via email to