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: The infamous getSize() == -1 (Was: [jira] [Created] (OAK-300) Query: QueryResult.getRows().getSize())
Date Thu, 20 Sep 2012 11:32:19 GMT
Hi,

>1) Next to getSize() iterator we also added getTotalSize(). I don't
>like the name because it is actually more something like:
>getTotalSizeWithoutCheckingACLs().

Hm, wouldn't that be a security problem?

Couldn't it be better (from a security perspective) if you can only get
this number if you use an admin session or similar?

The query engine currently doesn't have a way to retrieve the size,
without reading the nodes - even for the admin session. Could you create
an (OAK-) issue about this? It could be implemented, but I wonder if we
shouldn't rather implement aggregate functions in the query language:

    select count(*) from [nt:base] where ...

That way the query engine knows in advance it doesn't have to read the
nodes at all.

Regards,
Thomas


Mime
View raw message