jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Parvulescu <alex.parvule...@gmail.com>
Subject SegmentRootBuilder#getNodeState creates a new revision on each call
Date Thu, 31 Oct 2013 09:23:01 GMT

I noticed this looking at the query benchmarks and filed an issue for the
query engine (OAK-1132), but I think it's important to understand how this
works and if this is a bigger problem (OAK-1130 is possibly related).

If the SegmentRootBuilder#getNodeState creates a new revision (even though
looking  at the apis this should not have side effects), this means that
any call basically invalidates all existing NodeBuilders and forces an
update on the entire tree.

I'd like to use OAK-1130 as an example again. The trees are being loaded
around 5 times for each result row and it does look like there's something
in between that makes the #update call necessary even though the query test
itself should only have read calls against trees that have not changed
state at all.

Secondly, I think this affects Tree instances as well, as a tree wraps a

There is an important number of #getNodeState calls (both on Tree and on
NodeBuilder) so I'd be curious to see what others think about this issue.

I don't have any numbers yet, it's only something I've noticed looking at
the query benchmarks.
This would be an oak specific test, though so I'm not sure where it would


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message