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 07:47:58 GMT

What about renaming ContentSession.getCurrentRoot() to getHeadRoot() or

About workspaces - I know we said we don't support workspaces currently,
but there still is ContentSession.getWorkspaceName(). Could we remove this
method for now? The problem is that it's not clear whether
getCurrentRoot(), and the Root class, is for the / a workspace or for the
complete repository.

About the class Root: is the data returned by this class filtered for the
ContentSessions access rights? I can't find that info in the Javadocs. If
it is, maybe we could (later on) combine Root and ContentSession. But for
now I guess it's enough to add a comment in the Javadoc.


On 9/14/12 7:32 AM, "Thomas Mueller" <mueller@adobe.com> wrote:

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