Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.4.8, 1.5.11
Description
DefaultSyncHandler.listIdentities() collects users by searching for all nodes under /home – the xpath query executed is
/jcr:root/home//element(*)[@jcr:primaryType]
With a few hundred users this easily gives an oak index traversal warning:
org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed 1000 nodes with filter Filter(query=select [jcr:path], [jcr:score], * from [nt:base] as a where [jcr:primaryType] is not null and isdescendantnode(a, '/home') /* xpath: /jcr:root/home//element(*)[@jcr:primaryType] */, path=/home//*, property=[jcr:primaryType=[is not null]]); consider creating an index or changing the query
A few lines later it actually reduces the result to authorizables which have a rep:externalId. Since OAK-4301 there is an oak index for rep:externalId, so the query can be optimized by searching for anything with rep:externalId instead:
userManager.findAuthorizables("rep:externalId", null);
Attachments
Attachments
Issue Links
- is related to
-
OAK-5743 UserQueryManager: omits nt-name when searching for properties without path deliminator
- Closed
-
OAK-5689 AbstractSecurityTest: enforce test-failure for traversal queries
- Closed
-
OAK-5785 JCR tests: enforce failure upon query traversal
- Closed
- relates to
-
OAK-5892 ResultRowToAuthorizable: create user/group from tree
- Closed