Open
Description
The following two queries are executed at startup (thread name "Apache Sling Repository Startup Thread #1-ACTool-Config-Worker"). Depending on the content, they may try to read more than 100'000 nodes, which throws an exception, and so startup fails.
SELECT ace.* FROM [rep:ACE] AS ace
WHERE ace.[rep:principalName] IS NOT NULL
AND ISDESCENDANTNODE(ace, [/content])
SELECT ace.* FROM [rep:ACE] AS ace
WHERE ace.[rep:principalName] IS NOT NULL
AND ISDESCENDANTNODE(ace, [/apps])
Specially the first query may read too many entries. Both queries use the index /oak:index/acPrincipalName.
I think this is somewhat related to #219 - however switching to a Lucene index won't resolve the issue.
- In general, at startup, queries should not read that many nodes. If they do, startup can be delayed too much. I would recommend to run expensive queries (if they are really needed) after startup, so that startup is not blocked. Until the query is run, a cache can be used.
- Queries should no try to read more than about 5000 nodes. If they need to read more, then keyset pagination should be used, see also https://jackrabbit.apache.org/oak/docs/query/query-engine.html#keyset-pagination
Metadata
Metadata
Assignees
Labels
No labels