jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mueller <muel...@adobe.com>
Subject Re: ContentSession.getCurrentRoot() is slow
Date Fri, 14 Sep 2012 05:32:58 GMT

>It would be better if the query engine used the same tree snapshot as
>the rest of the session. There shouldn't be any need to call

This is actually what I expected that ContentSession.getCurrentRoot()
would provide me: I expected getCurrentRoot() would always return the same
root until the session has committed or refreshed. It wasn't obvious to me
neither from the method name nor from the javadocs that there is
(potentially) a new current root every time the method is called. Not a
problem, I can change the javadocs and add that info.

But now I see that the ContentSession doesn't in fact know the current
revision and doesn't provide snapshot isolation, how do I use the same
tree snapshot as the rest of the session? Is it the oak-jcr
SessionDelegate.root field? I guess I will have to change the oak-core
query API then, and add the Root as a parameter to the method


View raw message